Re: Custom Symbol Macro Language code expansion

Paul Wessel <[email protected]> Sat, 3 May 2014 09:40:18 -1000
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
Hi Kristof-

I will add more examples and tests for these very new ways of building custom symbols.  While at least tested once, some of the new features like %X %Y may be a bit beta and not well explained.  For instance, while I added them for a purpose I will have to scramble to find an example and why I did it.  So I will have to update and expand that appendix with more information and more examples, including more working custom symbols.

Since every symbol item scales with the overall symbol size given in -S I think the text items also need to scale accordingly, i.e., a 12p font is only 12 points when size is 1 inch.  But now things become inch-dependent which we dont want.  All other items are given sizes relative to a 1x1 item so we may have to specify font size the same way, e.g., 0.2 instead of some fixed font.  Or we have to interpret 12p as hardwired and unchanging.  I think this makes most sense:

1) If symbol font is given as <n>p then it is a fixed size independent of symbol size
2) Else, symbol size is fraction of 1x1 symbol as scaled via -S.

Paul

On May 3, 2014, at 5:32 AM, Kristof Koch <[email protected]> wrote:

> Dear List,
> 
> I'm trying to develop a custom symbol to annotate every 10° latitude and longitude with their respective values. The GMT Docs state: "You can embed %X or %Y to add the current longitude (or x) and latitude (or y) in your label string." (25.2.4. "Text substitution")
> 
> I only got the string "%Y" in the plotted symbol. See screenshot at http://kristofkoch.de/gmt/text_string_subst.png [1]
> 
> 
> I tried the following (bash script):
> 
> cat > lat_label.def << END
> 0a R
> 0.1 -0.1 7p \%Y l+jTL -W- -Gblack
> END
> 
> 
> Maybe I didn't understand the documentation concerning the expansion of special codes. I'd be grateful if anyone can point out the correct usage of "%Y".
> 
> Regards,
> Kristof Koch
> 
> 
> [1] I filed a bug for the excessively large letters: http://gmt.soest.hawaii.edu/issues/553 If anyone can explain the behavior please advise.
> --
> My PGP Public Key: http://kristofkoch.de/pgp/
> 
> 
> To unsubscribe, send the message "signoff gmt-help" to [email protected]

To unsubscribe, send the message "signoff gmt-help" to [email protected]