Discussion:
pstext GMT5
Matthew Bilskie
2014-08-21 12:57:26 UTC
Permalink
Hi all,

I am trying to understand the new format for the textfile used in pstext.
For example, I use an input file like the following:

-82.8 30.3 12 Helvetica Black 0 BL Florida

However, the text "12 Helvetica Black 0 BL Florida" plots at -82.8 30.3.

I have read (and reread) the man page on pstext, but cannot seem to figure
it out.

Thanks in advance.

Cheers


Matthew Bilskie, E.I.
Coastal Hydroscience Analysis, Modeling & Predictive Simulations Laboratory
www.champs.cecs.ucf.edu
www.mattbilskie.com
University of Central Florida
Civil, Environmental, & Construction Engineering Department
12800 Pegasus Drive, Suite 211
Orlando, FL 32816-2450

Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
Paul Wessel
2014-08-21 18:38:36 UTC
Permalink
Matthew-

If you want to stick with GMT4 format for now you can, but you are using a mix of things so pstext must assume you are using GMT5 format for input, hence your result.

GMT4 format is: x y size angle font justification text

As you can see you have a font name for angle, Black for font, 0 for justification, etc etc so it will instead assume you are giving it x y text

Fonts are specified as one item; see the GMT5 documentation on fonts. An example would be 12p,Helvetica,black

GMT5 lets you place all constant parameters on the command line instead of in the file. If all your labels had the same specs except for location and text then you would just use
-82.8 30.3 Florida
and use -F+f12p,Helvetica,black+jBL to set those two parameters (the zero angle is default, i.e. same as adding +a0). If you instead want to read any of those items from the data file then you leave off the arguments, i.e. -F+f+a+j would expect font, angle, and justification to follow x,y, in that order.
If so then the equivalent GMT5 file would look like

-82.8 30.3 12p,Helvetica,black 0 BL Florida

-p
Post by Matthew Bilskie
Hi all,
-82.8 30.3 12 Helvetica Black 0 BL Florida
However, the text "12 Helvetica Black 0 BL Florida" plots at -82.8 30.3.
I have read (and reread) the man page on pstext, but cannot seem to figure it out.
Thanks in advance.
Cheers
Matthew Bilskie, E.I.
Coastal Hydroscience Analysis, Modeling & Predictive Simulations Laboratory
www.champs.cecs.ucf.edu
www.mattbilskie.com
University of Central Florida
Civil, Environmental, & Construction Engineering Department
12800 Pegasus Drive, Suite 211
Orlando, FL 32816-2450
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
Matthew Bilskie
2014-08-21 19:03:54 UTC
Permalink
Thanks, Paul. I have it working now!

Matt
Post by Paul Wessel
Matthew-
If you want to stick with GMT4 format for now you can, but you are using a
mix of things so pstext must assume you are using GMT5 format for input,
hence your result.
GMT4 format is: x y size angle font justification text
As you can see you have a font name for angle, Black for font, 0 for
justification, etc etc so it will instead assume you are giving it x y text
Fonts are specified as one item; see the GMT5 documentation on fonts. An
example would be 12p,Helvetica,black
GMT5 lets you place all constant parameters on the command line instead of
in the file. If all your labels had the same specs except for location and
text then you would just use
-82.8 30.3 Florida
and use -F+f12p,Helvetica,black+jBL to set those two parameters (the zero
angle is default, i.e. same as adding +a0). If you instead want to read
any of those items from the data file then you leave off the arguments,
i.e. -F+f+a+j would expect font, angle, and justification to follow x,y, in
that order.
If so then the equivalent GMT5 file would look like
-82.8 30.3 12p,Helvetica,black 0 BL Florida
-p
Post by Matthew Bilskie
Hi all,
I am trying to understand the new format for the textfile used in
-82.8 30.3 12 Helvetica Black 0 BL Florida
However, the text "12 Helvetica Black 0 BL Florida" plots at -82.8 30.3.
I have read (and reread) the man page on pstext, but cannot seem to
figure it out.
Post by Matthew Bilskie
Thanks in advance.
Cheers
Matthew Bilskie, E.I.
Coastal Hydroscience Analysis, Modeling & Predictive Simulations
Laboratory
Post by Matthew Bilskie
www.champs.cecs.ucf.edu
www.mattbilskie.com
University of Central Florida
Civil, Environmental, & Construction Engineering Department
12800 Pegasus Drive, Suite 211
Orlando, FL 32816-2450
Mailing list for GMT discussions of all kinds. If you are not sure you
have found a bug, discuss it here first. To formally report bugs or request
features, please register and add New Issue on gmt.soest.hawaii.edu To
unsubscribe, send the message "signoff gmt-help" to
2014 - please use forum on gmt.soest.hawaii.edu instead.
Mailing list for GMT discussions of all kinds. If you are not sure you
have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New
Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on
gmt.soest.hawaii.edu instead.
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
Loading...