-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradient Scale and color #723
Comments
What happens if you just give two color values - the two at the end of the color range you want to use for the gradient? I’ve been working on rectbin and hist2d plots… maybe there should be two ways of supplying color values for the gradient. (1) just two values maybe calling that a range, and (2) supplying a list of colors as it is now?
|
Same issue here. I think the culprit is |
With regard to gradient scale, I got a problem.
When I set the gradient range from 0 to 20 It work well. But in case of set the range from 4 to 16, the gradient scale doesn't changed. I attached picture about that.
Also, To make continuous color map, I selected 5 color from CN array.
Then is it possible to using all CN color rather than select few color?
cn = linspace(Color.HSV(0,1,1),Color.HSV(250,1,1),150)
I hope to using color like below.
Scale.ContinuousColorScale(minvalue=0 , maxvalue=20 , Scale.lab_gradient( cn[:])),
But It doesn't work
Scale.ContinuousColorScale(minvalue=0 , maxvalue=20 , Scale.lab_gradient(
cn[1],cn[30],cn[60],cn[90],cn[120],cn[150])), >> work
Scale.ContinuousColorScale(minvalue=4 , maxvalue=16 , Scale.lab_gradient(
cn[1],cn[30],cn[60],cn[90],cn[120],cn[150])), >> Gradient scale doesn't changed.
map2 =plot(
#layer(df, x="x", y="y", color="vel", Theme(colorkey_swatch_shape=:square,default_point_size=(1.5mm),highlight_width=(0.1mm)), Geom.point),
layer(df2, x="x", y="y", color="vel", Theme(colorkey_swatch_shape=:square,default_point_size=(1.0mm),highlight_width=(0.1mm)), Geom.point),
Theme(panel_fill=color("white"),panel_stroke=color("black")), Guide.colorkey("V(km/s)"),
Scale.ContinuousColorScale(minvalue=0 , maxvalue=20 , Scale.lab_gradient(
cn[1],cn[30],cn[60],cn[90],cn[120],cn[150])),
Scale.x_continuous(minvalue=-440, maxvalue=-400),Scale.y_continuous(minvalue=-50, maxvalue=0),Coord.cartesian(xflip=true),
Guide.xlabel("R.A. offset (mas)"),Guide.ylabel("Dec. offset (mas)"),Guide.title("42"),
)
The text was updated successfully, but these errors were encountered: