GenericMappingTools / GMT.jl

Generic Mapping Tools Library Wrapper for Julia
Other
191 stars 28 forks source link

Crash when "gray" CPT is used #1472

Closed ZMAlt closed 3 weeks ago

ZMAlt commented 3 weeks ago

Hi, @joa-quim

I found a weird crash when "gray" CPT is used.

using GMT
grd = grdcut("@earth_relief_01d", region = (110, 120, 10, 20))
cpt = grd2cpt(grd, C = "gray")  # same situation for makecpt
grdimage(grd, C = cpt, savefig = "test.pdf")

If "gray" is replaced with other cpt, there is no crash.

joa-quim commented 3 weeks ago

Confirm it too. Thanks.

joa-quim commented 3 weeks ago

This is due to a bug in GMT that returns a conflicting info for the gray.cpt master CPT. Fixed in master by testing if the colors are gray or not.

ZMAlt commented 3 weeks ago

Great. I have tested it using the master branch. It works now. Thank you.