archz2
April 6, 2019, 2:47pm
1
Let’s say I have data of 700 numbers that ranges from 1 to 100. These numbers are generated from many points whose distances have been measured.
How can I classify those numbers into sets of
(a) 1-50
(b) 51-60
© 61-80
(d) 81-100 ?
And then assign different colour for each of the sets?
Data (a) = blue colour
Data (b) = green colour
Data © = yellow colour
Data (d) = yellow colour
chanley
(Chris Hanley)
April 6, 2019, 2:57pm
2
if it’s only a few named ranges, this shows a pretty straight forward setup using native components.
Ok, aside from the helpful advice you are receiving, here are a few other tips.
When you post an example file, please try simplify it! (not with all the plugins, your question was about python, not honeybee)
Note: you had the count set to tree access…if you are going to use it, set it to item.)
[Example1]
2 - you can sort values using native components:
(Screen shot has random values)
[Example2]
3 - You can use some slighty more advanced python techniques to accomplish the same result…
archz2
April 6, 2019, 3:06pm
3
I don’t understand the last part. How should I insert the final classified data generated into the legend colour component then in order to have
Data (a) = blue colour
Data (b) = green colour
Data © = yellow colour
Data (d) = yellow colour ?
chanley
(Chris Hanley)
April 6, 2019, 3:15pm
4
Do you want to color/shade some geometry based on these values? If so, you could use a similar approach that is described here. It’s for slope analysis, but the grouping/coloring of geometry based on some ranges of values, is very similar.
In addition to the suggestions already given, In order to get “percent” VS “degree” you just need to do a little math in between.
[SlopeAnalysis-PercentAndDegree]
This example uses one custom component to explode the mesh. There are a few others around.
Also, depending on the types of surfaces/meshes you are working with, I have found this to help speed things up a bit. Explode the mesh, decompose and measure against another vector(as described in other examples), then average them togethe…
Also, an example file is always helpful.
archz2
April 6, 2019, 4:39pm
6
Thanks! This looks really useful. I’ll surely check it out and revert back ASAP.
s.wac
(S Wac)
June 25, 2019, 12:05pm
7
I have similiar problem. I want to change color depending on radius. If radius is 100 change color to blue. If radius is 150 change color to red.
HS_Kim
June 25, 2019, 12:58pm
8
You can use Stream Filter .
StreamFilterDemo.gh (12.2 KB)
1 Like
s.wac
(S Wac)
June 25, 2019, 1:11pm
9
There is some issue with stream filter component.
color_arcs.3dm (35.6 KB)
color_arcs.gh (22.2 KB)
HS_Kim
June 25, 2019, 1:22pm
10
That is not the fault ofStream Filter . It doesn’t accept a string for gate input.
color_arcs_re.gh (13.1 KB)
2 Likes
HS_Kim
June 25, 2019, 1:48pm
13
Sorry… You can simplify first one by grafting pattern input ofPicn’n’Choose .
color_arcs_reV3.gh (13.3 KB)
1 Like