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

Home » Public Forums » archive » Re: Object Graphics plot problem
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
Re: Object Graphics plot problem [message #42432] Fri, 04 February 2005 07:49
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> Hi,
>
> Set the DOUBLE keyword for your view and it seems to work. On a
> different note, I made the view the graphics_tree for the window - so
> when i close the window the objects are nicely cleaned up - very handy
> feature. I have pasted in the changes below.

Wow! I'm always amazed at how IDL has included what you need, but
finding it is like finding a needle in a haystack. It's a good thing
that I asked the question, because it would have been a long time before
I'd have discovered the DOUBLE keyword on the view. Thanks.

-Mike
Re: Object Graphics plot problem [message #42434 is a reply to message #42432] Fri, 04 February 2005 06:07 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Michael Wallace wrote:

> I have run across a strange problem when I'm working with object
> graphics and have large values on the X axis. It appears that my X axis
> is losing precision when doing the plot.
>

Hi,

Set the DOUBLE keyword for your view and it seems to work. On a different note,
I made the view the graphics_tree for the window - so when i close the window
the objects are nicely cleaned up - very handy feature. I have pasted in the
changes below.

PRO Weirdness

; Make a nice sine wave
x = dindgen(360) * !dtor
y = sin(x)

; Uncomment to see a vertical line instead of a sine wave
; Add a really big number to X
x += 123456789

; Set up the objects
view = Obj_New('IDLgrView',/double) ;<<<<<<DOUBLE
model = Obj_New('IDLgrModel')
plot = Obj_New('IDLgrPlot', x, y)

view -> add, model
model -> add, plot

; Set plot scaling factors and viewplane
plot -> getProperty, XRANGE = xrange, YRANGE = yrange
plot -> setProperty, XCOORD_CONV = norm_coord(xrange)
plot -> setProperty, YCOORD_CONV = norm_coord(yrange)

view -> setProperty, VIEWPLANE_RECT = [-0.1, -0.1, 1.2, 1.2]

; Display the plot
window = Obj_New('IDLgrWindow', graphics_tree = view) ;<<<<< TREE
window -> draw, view
END
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Blurred display of images in PDFs created from EPS on Mac OS X
Next Topic: Case for XML (Was: convert very large string to numeric)

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

Current Time: Wed Oct 08 15:11:17 PDT 2025

Total time taken to generate the page: 0.00519 seconds