PLOT and LEGEND Function Graphic [message #87235] |
Sat, 18 January 2014 20:43  |
Gompie
Messages: 76 Registered: August 2012
|
Member |
|
|
Hi,
Now that I have made the mistake of using the function graphics over Dave's cgplot functions can you please help me with the following error that I am getting in function graphics.
When I give a=PLOT(x,y, NAME="2008/2009")
I get the error.
PLOT: The identifier property value cannot contain '/' characters.
I have to use NAME keyword because I later on use the LEGEND function graphic which uses NAME to identify the plot.
Any help in either getting the PLOT to accept the "/" or to get the LEGEND to show "2008/2009" against the target plot.
GlanPlon
|
|
|
Re: PLOT and LEGEND Function Graphic [message #87236 is a reply to message #87235] |
Sat, 18 January 2014 22:32   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Saturday, January 18, 2014 9:43:33 PM UTC-7, Gompie wrote:
> Hi,
>
> Now that I have made the mistake of using the function graphics over Dave's cgplot functions can you please help me with the following error that I am getting in function graphics.
>
>
>
> When I give a=PLOT(x,y, NAME="2008/2009")
>
> I get the error.
>
> PLOT: The identifier property value cannot contain '/' characters.
>
>
>
> I have to use NAME keyword because I later on use the LEGEND function graphic which uses NAME to identify the plot.
>
> Any help in either getting the PLOT to accept the "/" or to get the LEGEND to show "2008/2009" against the target plot.
>
> GlanPlon
Yes, unfortunately, this happens because the "/" is used to separate the different object graphics pieces, just like a directory separator.
But the easiest solution is to just use the "LaTeX" / character instead, like this:
p = plot(x, y, name='2008 $\slash$ 2009')
l = legend()
Notice that I put an extra space before and after the slash character. At least on my Mac, if you don't have the space, it doesn't leave enough room around the slash. Maybe because it is a Unicode "math" character. Also, I used single quotes so it doesn't think the 2008 is some sort of weird octal number.
Hope this helps!
-Chris
ExelisVIS
|
|
|
|
Re: PLOT and LEGEND Function Graphic [message #92005 is a reply to message #87235] |
Tue, 29 September 2015 09:36  |
ed.thiemann
Messages: 1 Registered: September 2015
|
Junior Member |
|
|
On Saturday, January 18, 2014 at 9:43:33 PM UTC-7, Gompie wrote:
> Hi,
> Now that I have made the mistake of using the function graphics over Dave's cgplot functions can you please help me with the following error that I am getting in function graphics.
>
> When I give a=PLOT(x,y, NAME="2008/2009")
> I get the error.
> PLOT: The identifier property value cannot contain '/' characters.
>
> I have to use NAME keyword because I later on use the LEGEND function graphic which uses NAME to identify the plot.
> Any help in either getting the PLOT to accept the "/" or to get the LEGEND to show "2008/2009" against the target plot.
> GlanPlon
You can also use a backslash instead '\'
Ed
|
|
|