Hi,
This is all about the command-line parsing. As Ferret reads in each
line, it's interpreting the characters -- what command is the user
asking for? Ah, it's the LABEL command. What are its arguments?
Then it's looking for commas or spaces between the arguments.
When quotes or other special characters are encountered, the parsing
step is looking to see if there a variable to be evaluated, or is
the text in the command indicating that a value of a symbol
translated and then put into the command string? When special
characters are encountered, like ^, that may indicate that something
should be done like make a superscript.
Much of the handling of text for labels is in the PPLUS library
which Ferret calls for graphics. This means a certain amount of
study of this part of the documentation.
A couple of useful references,
So, Peter's command could be done this way, where between the C and
the 1 are two single-quotes:
yes? label/nouser 6.5,-0.88,0,0,0.22 "C''1"
By the way, there is no /OVER qualifier for the LABEL command,
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/appendix-b-pplus-guide/PPLUS-COMMAND-FILES#_VPID_651
but in this instance the /over is ignored.
-Ansley
On 1/14/2013 5:09 AM, Peter Szabo
wrote:
Hi Marco,
I also do not get always the behaviour of labelling:
yes? label/nouser/ov 6.5,-0.88,0,0,0.22 "C'1" -> **ERROR
Unmatched '
yes? label/nouser/ov 6.5,-0.88,0,0,0.22 "C''1" -> C'1 ! this is
what I want. Wonder why double 's were needed.
yes? label/nouser/ov 6.5,-0.88,0,0,0.22 C''1 -> this one has
the same effect as the previous one. Strangely, quotations were
not needed.
Also,
yes? label/nouser/ov 6.5,-0.88,0,0,0.22 C^1 -> C1
(1 is uppercase, good to know), but it works fine if I put two ^s,
as well.
Also, Ferret does not like % between "".
Getting back to your problem, I think you should try avoiding "",
it worked for me.
yes? label/nouser 1 2 0 0 1 @P2 test
I am using FERRET v6.67.
Peter
On Mon, Jan 14, 2013 at 9:44 AM, Marco
van Hulten <Marco.van.Hulten@xxxxxxx>
wrote:
Dear Ferretters,
If I insert a coloured label, I get quotation characters in
front of
the label. So if I execute:
ppl %label/nouser 1 1 0 0 1 "test"
all is fine and the label "test" is inserted onto the graph.
But if I
execute:
ppl %label/nouser 1 1 0 0 1 @P2 "test"
the label "''test" is inserted onto the graph. Why is there
an extra
citation sybol or are there two extra apostrophes? Is this a
bug? Can
I remove this?
I am using Ferret v6.72.
Cheers,
Marco
|