gmt icon indicating copy to clipboard operation
gmt copied to clipboard

Improve auto-legend symbols

Open gd-a opened this issue 2 years ago • 3 comments

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.

Screenshot 2022-06-28 at 08 32 46

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 !

gd-a avatar Jun 28 '22 12:06 gd-a

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.

PaulWessel avatar Jun 28 '22 12:06 PaulWessel

weekends tend to be more flexible

Weekends are for hiking and scuba-diving ;)

gd-a avatar Jun 28 '22 13:06 gd-a

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 ...

gd-a avatar Jun 28 '22 18:06 gd-a