Discussion:
psscale - no labels
Mark Fenbers
2008-02-12 15:53:07 UTC
Permalink
I am having quite a bit of difficulty getting psscale to NOT label
anything on the scale. (I place words within the rectangles and so I
don't want any tick marks labeled with the numbers found in the .cpt
file... How do I do this? I tried 50 different things with the -B
format and read the man page on psbasemap about 6 times and have found
nothing that tells me how to *NOT* label the psscale... Any ideas?

Mark

To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
J.J.Green
2008-02-12 16:09:45 UTC
Permalink
Mark
Post by Mark Fenbers
I tried 50 different things with the -B
format and read the man page on psbasemap about 6 times and have found
nothing that tells me how to *NOT* label the psscale... Any ideas?
-B0 ? (untested)

Jim
--
J.J. Green, Dept. Applied Mathematics, Hicks Bld.,
University of Sheffield, UK. +44 (0114) 222 3742
http://sview01.wiredworkplace.net/pub/jjg

To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
Tim Seher
2008-02-12 22:39:08 UTC
Permalink
Hi!

I recently learnt on this mailing list, that the command

psscale -D5/10/7.5/0.5h -Ba100g100::/:'@~D@~t (ms)':WESN -Ctest.cpt -E >
test.ps

will produce tickmarks, while the command


psscale -D5/10/7.5/0.5h -Ba100g100::/:'@~D@~t (ms)':wesn -Ctest.cpt -E >
test.ps

will not produce ticks. However this seems not to work with -B::wesn,
which generates annotations. So it boils down to specifying an annotation
interval using a100 for example and then NOT labelling it using the wesn
option. Also check out

gmtset BASEMAP_AXES wesn

which might help.

Good luck, Tim!
Post by Mark Fenbers
I am having quite a bit of difficulty getting psscale to NOT label
anything on the scale. (I place words within the rectangles and so I
don't want any tick marks labeled with the numbers found in the .cpt
file... How do I do this? I tried 50 different things with the -B
format and read the man page on psbasemap about 6 times and have found
nothing that tells me how to *NOT* label the psscale... Any ideas?
Mark
To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
Mark Fenbers
2008-02-13 11:26:03 UTC
Permalink
Tim,

Thanks for your tips. I tried them all, including new ideas that your
tips spawned, yet I still have the psscale labeled with numbers. Oh,
how much life would be easier if GMT had transparency as a color
choice... *sigh*

Mark
Post by Tim Seher
Hi!
I recently learnt on this mailing list, that the command
test.ps
will produce tickmarks, while the command
test.ps
will not produce ticks. However this seems not to work with -B::wesn,
which generates annotations. So it boils down to specifying an annotation
interval using a100 for example and then NOT labelling it using the wesn
option. Also check out
gmtset BASEMAP_AXES wesn
which might help.
Good luck, Tim!
Post by Mark Fenbers
I am having quite a bit of difficulty getting psscale to NOT label
anything on the scale. (I place words within the rectangles and so I
don't want any tick marks labeled with the numbers found in the .cpt
file... How do I do this? I tried 50 different things with the -B
format and read the man page on psbasemap about 6 times and have found
nothing that tells me how to *NOT* label the psscale... Any ideas?
Mark
To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
Marta Ghidella
2008-02-13 13:12:38 UTC
Permalink
Hello Mark:

Please look at the attached files. I think this is what you want.

gmtset TICK_LENGTH 0.0
psscale -Ctest.cpt -B::/:"nT": -E -D4/3/7/0.25h -L -S -K -V >
color_scale.ps
psscale -Ctest.cpt -B::/:: -D4/4/7/0.25h -L -S -O -V >> color_scale.ps
gmtset TICK_LENGTH 0.075i

-S :Do not separate different colour intervals with black lines.
And the ";" token at the end of each slice in the cpt file with
nothing following it results in no annotations.

Cheers,

Marta

--
Dra. Marta E. Ghidella
Instituto Antártico Argentino

----- Original Message -----
From: "Mark Fenbers" <***@NOAA.GOV>
To: <GMT-***@HAWAII.EDU>
Sent: Wednesday, February 13, 2008 9:26 AM
Subject: Re: [GMT-HELP] psscale - no labels


Tim,

Thanks for your tips. I tried them all, including new ideas that your
tips spawned, yet I still have the psscale labeled with numbers. Oh,
how much life would be easier if GMT had transparency as a color
choice... *sigh*

Mark
Post by Tim Seher
Hi!
I recently learnt on this mailing list, that the command
(ms)':WESN -Ctest.cpt -E >
test.ps
will produce tickmarks, while the command
(ms)':wesn -Ctest.cpt -E >
test.ps
will not produce ticks. However this seems not to work
with -B::wesn,
which generates annotations. So it boils down to specifying an
annotation
interval using a100 for example and then NOT labelling it using the wesn
option. Also check out
gmtset BASEMAP_AXES wesn
which might help.
Good luck, Tim!
Post by Mark Fenbers
I am having quite a bit of difficulty getting psscale to NOT label
anything on the scale. (I place words within the rectangles and so I
don't want any tick marks labeled with the numbers found in the .cpt
file... How do I do this? I tried 50 different things with the -B
format and read the man page on psbasemap about 6 times and have found
nothing that tells me how to *NOT* label the psscale... Any ideas?
Mark
To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
Mark Fenbers
2008-02-13 15:09:44 UTC
Permalink
Thanks, Marta. But using "TICK_LENGTH 0" produces no ticks (good!), but
the scale is still labeled. The -S produces no dividers (but I prefer
them). I put semicolons after each slice in my .cpt file, but psscale
doesn't like the semicolons and throws some errors and doesn't plot the
scale or any data. I also noticed that the psscale man page does not
list the -S option. Could it be that this feature I am wanting is in
only a recent version of GMT4? I thought I had a pretty recent version
of GMT. How can I tell what minor version I'm using?

Mark
Post by Marta Ghidella
Please look at the attached files. I think this is what you want.
gmtset TICK_LENGTH 0.0
psscale -Ctest.cpt -B::/:"nT": -E -D4/3/7/0.25h -L -S -K -V >
color_scale.ps
psscale -Ctest.cpt -B::/:: -D4/4/7/0.25h -L -S -O -V >> color_scale.ps
gmtset TICK_LENGTH 0.075i
-S :Do not separate different colour intervals with black lines.
And the ";" token at the end of each slice in the cpt file with
nothing following it results in no annotations.
Cheers,
Marta
To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
Marta Ghidella
2008-02-13 16:30:49 UTC
Permalink
Hello Mark:

I am using a CVS version from Nov 16 2007, 4.2.2b. But the man page for psscale is the same as that for GMT version 4.2.0:

--------
-B
Set annotation, tick, and gridline interval for the colorbar.
The xaxis label will plot beneath a horizontal bar (or verti-
cally to the right of a vertical bar). As an option, use the
yaxis label to plot the data unit to the right of a horizontal
bar (and above a vertical bar). If no values are provided, the
default is to annotate every color level (which may be overrid-
den by ULB flags in the cpt file). Note that since vertical
labels will be plotted as a column of individual characters, no
octal escape characters embedded in the label are allowed. Text
with such characters will be plotted horizontally (relative to
the color scale). By default, labels are generated from the
numerical entries. To specify custom text labels for intervals,
you must append ;label to each z-slice in the cpt file.
--------

If you type:
gmt
at the command prompt, you will find out what version you are using.
....

I found when the semicolon option was introduced:

01-JAN-2006: GMT Version 4.1 Released
[psscale]: Now supports an optional ;label at end of each line in cpt files. If present this label will replace the default annotations when option -L is used.

I think it has to work...

Cheers,

Marta
--
Dra. Marta E. Ghidella
Instituto Antártico Argentino

----- Original Message -----
From: "Mark Fenbers" <***@NOAA.GOV>
To: <GMT-***@HAWAII.EDU>
Sent: Wednesday, February 13, 2008 1:09 PM
Subject: Re: [GMT-HELP] psscale - no labels


Thanks, Marta. But using "TICK_LENGTH 0" produces no ticks (good!), but
the scale is still labeled. The -S produces no dividers (but I prefer
them). I put semicolons after each slice in my .cpt file, but psscale
doesn't like the semicolons and throws some errors and doesn't plot the
scale or any data. I also noticed that the psscale man page does not
list the -S option. Could it be that this feature I am wanting is in
only a recent version of GMT4? I thought I had a pretty recent version
of GMT. How can I tell what minor version I'm using?

Mark
Post by Marta Ghidella
Please look at the attached files. I think this is what you want.
gmtset TICK_LENGTH 0.0
psscale -Ctest.cpt -B::/:"nT": -E -D4/3/7/0.25h -L -S -K -V >
color_scale.ps
psscale -Ctest.cpt -B::/:: -D4/4/7/0.25h -L -S -O -V >> color_scale.ps
gmtset TICK_LENGTH 0.075i
-S :Do not separate different colour intervals with black lines.
And the ";" token at the end of each slice in the cpt file with
nothing following it results in no annotations.
Mark Fenbers
2008-02-13 19:33:48 UTC
Permalink
OK. It looks like an upgrade will solve my problem. I'm not running=
=20
the latest on this particular computer (4.0). I also like Paul's tri=
ck=20
of setting the font size to 0 for the psscale... because there are ot=
her=20
maps I generate which use the same .cpt file, so the semicolons would=
=20
negatively affect those scripts, too.

Mark
=20
I am using a CVS version from Nov 16 2007, 4.2.2b. But the man page=
=20
=20
--------
-B
Set annotation, tick, and gridline interval for the colorbar.
The xaxis label will plot beneath a horizontal bar (or verti-
cally to the right of a vertical bar). As an option, use the
yaxis label to plot the data unit to the right of a horizontal
bar (and above a vertical bar). If no values are provided, the
default is to annotate every color level (which may be overrid-
den by ULB flags in the cpt file). Note that since vertical
labels will be plotted as a column of individual characters, no
octal escape characters embedded in the label are allowed. Text
with such characters will be plotted horizontally (relative to
the color scale). *By default, labels are generated from the
numerical entries. To specify custom text labels for intervals,
you must append ;label to each z-slice in the cpt file*.
--------
=20
gmt
at the command prompt, you will find out what version you are using=
.
*....*
=20
=20
01-JAN-2006: GMT Version 4.1 Released
[psscale]: Now supports an optional *;label* at end of each line in=
=20
cpt files. If present this label will replace the default annotatio=
ns=20
*when option -L is used*.
=20
I think it has to work...
=20
Cheers,
=20
Marta
--
Dra. Marta E. Ghidella
Instituto Ant=E1rtico Argentino
----- Original Message -----
Sent: Wednesday, February 13, 2008 1:09 PM
Subject: Re: [GMT-HELP] psscale - no labels
Thanks, Marta. But using "TICK_LENGTH 0" produces no ticks (good!)=
, but
the scale is still labeled. The -S produces no dividers (but I pre=
fer
them). I put semicolons after each slice in my .cpt file, but pssc=
ale
doesn't like the semicolons and throws some errors and doesn't plot=
the
scale or any data. I also noticed that the psscale man page does n=
ot
list the -S option. Could it be that this feature I am wanting is =
in
only a recent version of GMT4? I thought I had a pretty recent ver=
sion
of GMT. How can I tell what minor version I'm using?
Mark
Post by Marta Ghidella
Please look at the attached files. I think this is what you want.
gmtset TICK_LENGTH 0.0
psscale -Ctest.cpt -B::/:"nT": -E -D4/3/7/0.25h -L -S -K -V >
color_scale.ps
psscale -Ctest.cpt -B::/:: -D4/4/7/0.25h -L -S -O -V >> color_sca=
le.ps
Post by Marta Ghidella
gmtset TICK_LENGTH 0.075i
-S :Do not separate different colour intervals with black lines.
And the ";" token at the end of each slice in the cpt file with
nothing following it results in no annotations.
To unsubscribe, send the message "signoff gmt-help" to ***@hawai=
i.edu
Paul Wessel
2008-02-13 17:51:05 UTC
Permalink
While we think of a better way: Just set the annotation font to 0
which will not plot any text.
-p
Post by Mark Fenbers
Thanks, Marta. But using "TICK_LENGTH 0" produces no ticks (good!),
but the scale is still labeled. The -S produces no dividers (but I
prefer them). I put semicolons after each slice in my .cpt file,
but psscale doesn't like the semicolons and throws some errors and
doesn't plot the scale or any data. I also noticed that the psscale
man page does not list the -S option. Could it be that this feature
I am wanting is in only a recent version of GMT4? I thought I had a
pretty recent version of GMT. How can I tell what minor version I'm
using?
Mark
Post by Marta Ghidella
Please look at the attached files. I think this is what you want.
gmtset TICK_LENGTH 0.0
psscale -Ctest.cpt -B::/:"nT": -E -D4/3/7/0.25h -L -S -K -V >
color_scale.ps
psscale -Ctest.cpt -B::/:: -D4/4/7/0.25h -L -S -O -V >>
color_scale.ps
gmtset TICK_LENGTH 0.075i
-S :Do not separate different colour intervals with black lines.
And the ";" token at the end of each slice in the cpt file with
nothing following it results in no annotations.
Cheers,
Marta
To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
Sæther Arild
2008-02-21 14:24:40 UTC
Permalink
Hi,

I use GMT regularly, but at a fairly basic level, so I usually manage to find answers to my questions online with a little searching, but I have a problem finding a good way to scale symbols plotted with psxy (-Sc -Sa etc).

My data file looks like this:

Lat Long Value

The first two are fine, but Value stretches from 0 to almost 10000. When plotting with the -Sc switch and getting data from the file, values in the range 0.1-1 seem to draw circles of a fair and usable size, but 10000? Useless.

I have edited data files previously, dividing the Value by, say, 10000, but this is hardly elegant. Is there a better way to scale Value down to where it produces something in the 0.1-1 range, or so?

Best regards,

Arild Saether

To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
José Gómez-Dans
2008-02-21 14:40:59 UTC
Permalink
I have edited data files previously, dividing the Value by, say, 10=
000, but
this is hardly elegant. Is there a better way to scale Value down t=
o where
it produces something in the 0.1-1 range, or so?
Can't you scale of the "value" column? The size column is in whatever=
units=20
you tell GMT to be (cm, in), so you can scale your 10 000 to be 1 cm=
=20
diameter, and your 1000 value to be 0.25cm. You can always do a log t=
ransform=20
as well to squash the value ranges.

J

To unsubscribe, send the message "signoff gmt-help" to ***@hawai=
i.edu
J.J.Green
2008-02-21 14:40:36 UTC
Permalink
Hi Arild
Post by Sæther Arild
Lat Long Value
I have edited data files previously, dividing the Value by, say,
10000, but this is hardly elegant.
use awk to scale you data

cat file.dat | awk '{print $1,$2,0.0001*$3}' > newfile.dat

Cheers

Jim
--
J.J. Green, Dept. Applied Mathematics, Hicks Bld.,
University of Sheffield, UK. +44 (0114) 222 3742
http://sview01.wiredworkplace.net/pub/jjg

To unsubscribe, send the message "signoff gmt-help" to ***@hawaii.edu
Mike Mikitiuk
2008-02-21 14:46:20 UTC
Permalink
Arild,

You could try plotting the natural log (ln) of your data. To avoid p=
roblems
with ln(0.0), try ln(n+1), where n is between 0 and 10000. This wil=
l give
you a range of values between 0.0 and 9.21.

Mike
-----Original Message-----
From: World-Wide GMT Usage and Help Mailing List [mailto:GMT-
Sent: Thursday, February 21, 2008 9:25 AM
Subject: [GMT-HELP] Scaling psxy plotted symbols.
=20
Hi,
=20
I use GMT regularly, but at a fairly basic level, so I usually mana=
ge to
find answers to my questions online with a little searching, but I =
have a
problem finding a good way to scale symbols plotted with psxy (-Sc =
-Sa
etc).
=20
=20
Lat=09Long=09Value
=20
The first two are fine, but Value stretches from 0 to almost 10000.=
When
plotting with the -Sc switch and getting data from the file, values=
in the
range 0.1-1 seem to draw circles of a fair and usable size, but 100=
00?
Useless.
=20
I have edited data files previously, dividing the Value by, say, 10=
000,
but this is hardly elegant. Is there a better way to scale Value do=
wn to
where it produces something in the 0.1-1 range, or so?
=20
Best regards,
=20
Arild Saether
=20
aii.edu

To unsubscribe, send the message "signoff gmt-help" to ***@hawai=
i.edu

Marta Ghidella
2008-02-13 18:16:02 UTC
Permalink
I am resending this, as apparntly it didn't get through.
What I want to stress is that the ;label method works since version 4.1

Cheers,

Marta

----- Original Message -----
From: Marta Ghidella
To: World-Wide GMT Usage and Help Mailing List ; ***@NOAA.GOV
Sent: Wednesday, February 13, 2008 2:30 PM
Subject: Re: [GMT-HELP] psscale - no labels


Hello Mark:

I am using a CVS version from Nov 16 2007, 4.2.2b. But the man page for psscale is the same as that for GMT version 4.2.0:

--------
-B
Set annotation, tick, and gridline interval for the colorbar.
The xaxis label will plot beneath a horizontal bar (or verti-
cally to the right of a vertical bar). As an option, use the
yaxis label to plot the data unit to the right of a horizontal
bar (and above a vertical bar). If no values are provided, the
default is to annotate every color level (which may be overrid-
den by ULB flags in the cpt file). Note that since vertical
labels will be plotted as a column of individual characters, no
octal escape characters embedded in the label are allowed. Text
with such characters will be plotted horizontally (relative to
the color scale). By default, labels are generated from the
numerical entries. To specify custom text labels for intervals,
you must append ;label to each z-slice in the cpt file.
--------

If you type:
gmt
at the command prompt, you will find out what version you are using.
....

I found when the semicolon option was introduced:

01-JAN-2006: GMT Version 4.1 Released
[psscale]: Now supports an optional ;label at end of each line in cpt files. If present this label will replace the default annotations when option -L is used.

I think it has to work...

Cheers,

Marta

--
Dra. Marta E. Ghidella
Instituto Antártico Argentino

----- Original Message -----
From: "Mark Fenbers" <***@NOAA.GOV>
To: <GMT-***@HAWAII.EDU>
Sent: Wednesday, February 13, 2008 1:09 PM
Subject: Re: [GMT-HELP] psscale - no labels


Thanks, Marta. But using "TICK_LENGTH 0" produces no ticks (good!), but
the scale is still labeled. The -S produces no dividers (but I prefer
them). I put semicolons after each slice in my .cpt file, but psscale
doesn't like the semicolons and throws some errors and doesn't plot the
scale or any data. I also noticed that the psscale man page does not
list the -S option. Could it be that this feature I am wanting is in
only a recent version of GMT4? I thought I had a pretty recent version
of GMT. How can I tell what minor version I'm using?

Mark
Post by Marta Ghidella
Please look at the attached files. I think this is what you want.
gmtset TICK_LENGTH 0.0
psscale -Ctest.cpt -B::/:"nT": -E -D4/3/7/0.25h -L -S -K -V >
color_scale.ps
psscale -Ctest.cpt -B::/:: -D4/4/7/0.25h -L -S -O -V >> color_scale.ps
gmtset TICK_LENGTH 0.075i
-S :Do not separate different colour intervals with black lines.
And the ";" token at the end of each slice in the cpt file with
nothing following it results in no annotations.
Loading...