Skip to content

Odd makecpt behavior from Julia #7558

@joa-quim

Description

@joa-quim
# Correct

julia> makecpt(cmap=(:red,:green,:blue), range=[0 100 200 450])
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 │     0.0    255.0      0.0      0.0    255.0      0.0      0.0    100.0    200.0
   3 │     0.0      0.0    255.0      0.0      0.0    255.0      0.0    200.0    450.0

# Inventive

julia> makecpt(cmap=(:red,:green,:blue), range=[0 100 200 451])
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    200.0
   3 │     0.0      0.0    255.0      0.0      0.0    255.0      0.0    200.0    451.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions