I tend to use transparency (-t[n]
) on layers with grids plotted with grdimage
and a CPT.
When plotting the color scale with psscale
, the colors are opaque, so they have a different look than what is present in the actual map. One solution is to use -t[n]
in the psscale
command, but this makes everything in that layer transparent - including text. Any way to make the colors in the scale have the same transparency as in the grdimage
-layer without affecting the text?
Mmm, Have you try using a @transparency after the color?
Thanks for the tip Esteban82; I’ll try this!
1 Like
Strange, the transparency doesn’t seem to affect the psscale
- it is plotted with no transparency.
Shouldn’t this give a bar with transparent colors?
gmt makecpt -A50 -Cturbo -T-4000/-1000/500 -D > temp-col
gmt psscale -Ctemp-col -R0/10/0/10 -JX10c -pdf temp-col
I think that is a “feature”, i.e., something that has not been implemented. There would also be some limitations on this. If you have a continuous colorbar and you have a section of it with transparency then we cannot do it - it would have to be all of them with a constant transparency. But discrete colorbars one can have some individual transparent colors, or all.
Please open an issue for a feature request to allow psscale to place transparent CPTs.
Understood. Thanks Paul. Will open an issue.
Esteban82: your suggestion was my solution. Paul just needed to implement the feature before I could use it!
This is a textbook example of how software development should be done. I continue to be amazed, but I shouldn’t be - I’ve experiencedd it over and over again.
Great work!!