-
Notifications
You must be signed in to change notification settings - Fork 28
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
behaviour of makecpt #1198
Comments
Had a very quick look (need to go out) and yes, there seems to be some error. Try
Note that the GMT.jl location is not that anymore. Type (I'll come back when I find what the first form is not working well) |
Thanks for the quick response. It is something relating to the non-linear scale. |
Indeed, the behavior depends on the numbers, which is not right. It really looks a bug upstream (GMT binary)
|
Thanks! |
For reference, issue GenericMappingTools/gmt#7558 |
Thanks for tracking the error. |
Fixed in #1200 |
thanks! |
See below the output.
I expect to see different colours for Row #1 and R#2; however, Row #1 and Row #2 are in the same colour.
The first example is from: https://docs.juliahub.com/GMT/EoU0j/0.29.0/makecpt/#Discrete-versus-Continuous-CPT
Is this a bug, or did I misunderstand the example? Many thanks. -LH.
julia> makecpt(cmap=(:red,:green,:blue), range=[0,100,300,1000], no_bg=true)
Extract of a GMTcpt exposed as a GMTdataset for display. Colors converted to [0-255]
Model: rgb
Color depth: 24
3×9 GMTdataset{Float64, 2}
Row │ r1 g1 b1 r2 g2 b2 alpha z1 z2
│ Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64
─────┼─────────────────────────────────────────────────────────────────────────────────
1 │ 255.0 0.0 0.0 255.0 0.0 0.0 0.0 0.0 100.0
2 │ 255.0 0.0 0.0 255.0 0.0 0.0 0.0 100.0 300.0
3 │ 0.0 255.0 0.0 0.0 255.0 0.0 0.0 300.0 1000.0
julia> topo = makecpt(cmap=(:red, :blue, :green, :yellow), range= [0.0, 0.01, 0.05, 0.1, 0.2]) #make colorbar other options: color=:polar
Extract of a GMTcpt exposed as a GMTdataset for display. Colors converted to [0-255]
Model: rgb
Color depth: 24
4×9 GMTdataset{Float64, 2}
Row │ r1 g1 b1 r2 g2 b2 alpha z1 z2
│ Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64
─────┼─────────────────────────────────────────────────────────────────────────────────
1 │ 255.0 0.0 0.0 255.0 0.0 0.0 0.0 0.0 0.01
2 │ 255.0 0.0 0.0 255.0 0.0 0.0 0.0 0.01 0.05
3 │ 0.0 0.0 255.0 0.0 0.0 255.0 0.0 0.05 0.1
4 │ 255.0 255.0 0.0 255.0 255.0 0.0 0.0 0.1 0.2
The text was updated successfully, but these errors were encountered: