Transparency - Julia script on MacOS

Hi,

I’m learning how to use Julia for GMT - I’m liking it a lot after having done all my GMT using shell scripts for the past thirty years or so!

However, I cannot seem to get transparency to work. I am overlaying a coastline on some other stuff using this code:

 coast!(
	 res = :auto, shore = "thinnest,black", 
	 land = "brown",
	 transparency=75,
 )

I’ve exported the plot as both PNG and PDF format, but no matter what I do, the land is solid, opaque brown. Is there something else I need to do to get transparency, or is this a known thing which doesn’t work (I’m wondering if it’s the Mac’s preview which cannot handle transparency)?

Here is what my plot looks like, with the above transparency supposedly turned on:

I was expecting to see the rainbow coloured background show through the brown land.

Tim, happy to hear that are liking it.

The transparency works fine via the Julia wrapper but ghostscript 10 happens to have revealed a feature in GMT that was not prepared for the transition 9 -> 10, which broke the transparency. Options are, use the GMT dev version or downgrade the ghost to 9.xx

Note that all that GMT.jl does is to parse the nice new syntax to the hardcore classic syntax and send it back to GMT lib. You can see what command is generated by using the option Vd. Vd=1 prints what’s is executed and Vd=2 prints but does not execute. Vd=3 is like =2 but shows also the type of data sent to the lib. This meas that in case of doubts you can run the entire command(s) in pure and hard GMT syntax.

res = :auto

No need, it’s the default.

1 Like