Main Page | Report Page

 

  Computers Forum Index » Computer Languages (IDL-PVWAVE) » How to query New Graphics object properties?...

Author Message
Paul van Delst...
Posted: Tue Nov 16, 2010 4:40 am
 
Hello,

Is there a way to query the properties of a NG object?

For example, if I do a simple
IDL> x = lindgen(100)
IDL> p = plot(x)
is there any way to get the MARGIN property of the created plot? I couldn't find a way to do it in the docs, and the
created objects don't seem to have a class:
IDL> help, p
P OBJREF = <ObjHeapVar21383>
IDL> help, obj_class(p)
<Expression> STRING = ''
IDL> help, obj_hasmethod(p,'getproperty')
<Expression> BYTE = 0

The reason I ask is because when I create a plot with small y-values, the y-tickvalues are in exponential format and the
y-title is off the edge of the plot. I want to set the margin of the left-hand side to give more room. Checking the
property list does show margins (only two) but when I use them explicitly they don't give the same space around the plot
as specifying no margin keyword.

Anyway, after trial-and-erroring, I found the following produces approximately the same margins as the default:
IDL> p2=plot(x,margin=[0.13,0.12,0.08,0.12])
where the order is [left,bottom,right,top].

If anyone can suggest a smarter way, please do. I'm hoping I'm suffering from severe brain-fade and failed to see
something obvious in the docs.

cheers,

paulv
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Sep 02, 2014 5:11 am