comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » PLOT and LEGEND Function Graphic
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
PLOT and LEGEND Function Graphic [message #87235] Sat, 18 January 2014 20:43 Go to next message
Gompie is currently offline  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 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  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 #87238 is a reply to message #87236] Sun, 19 January 2014 14:13 Go to previous messageGo to next message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
Thanks That Works
Re: PLOT and LEGEND Function Graphic [message #92005 is a reply to message #87235] Tue, 29 September 2015 09:36 Go to previous message
ed.thiemann is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Zooming in function graphics
Next Topic: how to search if a variable exists in a file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:56:31 PDT 2025

Total time taken to generate the page: 0.00375 seconds