gmt icon indicating copy to clipboard operation
gmt copied to clipboard

Improved auto-labeling of colorbars in one-liners

Open PaulWessel opened this issue 3 years ago • 0 comments

Description of the desired feature

Currently, when such one-liners are run we issue a colorbar call to place the color bar beneath the plot. However, since the user is not typing those commands the annotations are plain (-Bxaf) and there is no labeling of the bar to indicate what it is. The suggestion is to use the grid's z-name string as y-label for the colorbar. In the worst case it will place a "z" there for grids with no information, which is not bad, but in better cases it will place m, mGal, km, C etc if the grid has a sensible unit name.

The implementation would be that grdimage and grdview would create a small file in the session directory to hold the selected color label and then colorbar can check if such a file exist and if so, use that string to add -By+lstring to the hidden call.

PaulWessel avatar Jun 28 '22 10:06 PaulWessel