gmt
gmt copied to clipboard
Improve auto-legend symbols
Following this question on forum
I want to be able to change the shape of the arrow drawn by automatic legend :
gmt grdvector tmp_u10.nc tmp_v10.nc -Gblack -Wthickest,black -Si${v_scale}+c+s1 -Q6p+e+a50+jc+h0.2+n${v_norm}/0.025d -l"1 m.s@+-1@+"
This line creates arrows with quasi-rectangular head and makes a 1 data unit to span ${v_scale} map unit (here 2.5º for 1m/s) Everything smaller than ${v_norm} is shrunk and the shrinking limit is 0.025º.
Alright, now with auto-legend this is the result (extracted from legend -T
):
S - v 0.313416i black thickest,black - 1 m.s@+-1@+
What I'd like is to be able to modify -v
to -v6p+e+a50+h0.2
to have the plot and the legend match.

The only workaround I've figured out so far is to run the script twice. One time to generate the legend specfile then a second time to read the manually modified version. But it is not practical considering the incoming movie
version...
Thanks !
Thanks for posting. Note that we will be doing a GMT/UNAVCO workshop next week so we may be a bit preoccupied. But weekends tend to be more flexible.
weekends tend to be more flexible
Weekends are for hiking and scuba-diving ;)
What I'd like is to be able to modify -v to -v6p+e+a50+h0.2 to have the plot and the legend match.
Of course, an even better solution would be for -l
to directly pick the -Q
modifier arguments ...