cpt4dcw

C = cpt4dcw(codes::String, vals::Vector{<:Real}; kwargs...) --> GMTcpt.html)

Create a categorical CPT to use with the output of coast(dcw=...) to make Choropleth maps.

Optionally provide a CPT in the kwarg cmap=CPT with a range sufficient to transform the vals in colors. As an alternative to the above, provide a makecpt type range numeric vector to create a CPT. If none of these are provided a default CPT = makecpt(range=(0,255,1)) will be used.

Returns

A GMTcpt color map.

Examples

using GMT

C = cpt4dcw("PT,ES,FR", [3., 5, 8], range=[3,9,1])
Extract of a GMTcpt exposed as a GMTdataset for display.
CATEGORICAL palette.
Model: rgb
Color depth: 24
3×5 GMTdataset{Float64, 2}
 Row │   z      r      g      b  alpha  Labels
─────┼─────────────────────────────────────────
   1 │ 3.0   67.0   79.0  187.0    0.0      PT
   2 │ 5.0   86.0  250.0  117.0    0.0      ES
   3 │ 7.0  186.0   30.0    2.0    0.0      FR

See Also

makecpt