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

Home » Public Forums » archive » Re: peculiar things with Z-device
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: peculiar things with Z-device [message #30983] Fri, 31 May 2002 08:30
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Sverre Solberg wrote:
> I am plotting data points on maps using the map functions in idl and
> using the Z-device. When the points are close to the plot boundary,
> the program occasionally crashes and complains about too few valid
> data points. It crashes when trying to call the 'oplot' procedure (for
> each individual point). The peculiar thing is that this works
> perfectly using other devices (as 'x', 'cgm'). And the even more
> peculiar thing is that this depends on the value of oplot's keyword
> 'symsize'. For example if I use symsize=0.4 it crashes, whereas
> symsize = 0.38 or 0.42 works without problems...
>
> I must admit this belongs to the more weird things I have experienced
> with idl.
>
> When I use the 'convert_coord' function, it doesnt seem though as the
> problematic points are outside the plotting area (device coordinates
> are larger than 0).
>
> Has anybody any similar experiences?

This may or may not be related to your problem.

If you are using the SCALE keyword in conjunction with MAP_SET, the
extent of map projections varies slightly between screen displays (e.g.
'X') and the Z device. This happens because the inherent "resolution" of
the devices is slightly different, e.g.

IDL Version 5.3 (IRIX mipseb). (c) 1999, Research Systems, Inc.

IDL> set_plot, 'X'
IDL> help, !d.x_px_cm
<Expression> FLOAT = 40.0000
IDL> set_plot, 'Z'
IDL> help, !d.x_px_cm
<Expression> STRING = 'Z'
<Expression> FLOAT = 26.0000

To ensure that the map extent in the Z device is the same as the X
device, I use the following construct:

lat = 45.0
lon = -89.0
scale = 10e6
map_set, lat, lon, /lambert, scale=(scale * (!d.x_px_cm / 40.0))

This is very helpful when IDL is running in the UNIX background, and the
Z device is used to create maps, e.g.

http://eosdb.ssec.wisc.edu/modisdirect/

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: peculiar things with Z-device [message #30985 is a reply to message #30983] Fri, 31 May 2002 06:26 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
>
> Sverre Solberg (sso@nilu.no) writes:
>
>> I am plotting data points on maps using the map functions in idl and
>> using the Z-device. When the points are close to the plot boundary,
>> the program occasionally crashes and complains about too few valid
>> data points. It crashes when trying to call the 'oplot' procedure (for
>> each individual point). The peculiar thing is that this works
>> perfectly using other devices (as 'x', 'cgm'). And the even more
>> peculiar thing is that this depends on the value of oplot's keyword
>> 'symsize'. For example if I use symsize=0.4 it crashes, whereas
>> symsize = 0.38 or 0.42 works without problems...
>>
>> I must admit this belongs to the more weird things I have experienced
>> with idl.
>>
>> When I use the 'convert_coord' function, it doesnt seem though as the
>> problematic points are outside the plotting area (device coordinates
>> are larger than 0).
>>
>> Has anybody any similar experiences?
>
> I've seen weird things with the Z-buffer, too.
> One of the things I do as a rule is set !P.Charsize to 1
> when I enter the Z-buffer. This seems to make the buffer
> environment consistent with my display device. Since the problem
> you describe seems to have something to do with sizes,
> I would give this a try. Couldn't hurt. :-)

The OP might also consider using PLOTS rather than OPLOT for single point plotting (if I
understood his post correctly).

paulv

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP/EMC purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
Re: peculiar things with Z-device [message #30986 is a reply to message #30985] Fri, 31 May 2002 05:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sverre Solberg (sso@nilu.no) writes:

> I am plotting data points on maps using the map functions in idl and
> using the Z-device. When the points are close to the plot boundary,
> the program occasionally crashes and complains about too few valid
> data points. It crashes when trying to call the 'oplot' procedure (for
> each individual point). The peculiar thing is that this works
> perfectly using other devices (as 'x', 'cgm'). And the even more
> peculiar thing is that this depends on the value of oplot's keyword
> 'symsize'. For example if I use symsize=0.4 it crashes, whereas
> symsize = 0.38 or 0.42 works without problems...
>
> I must admit this belongs to the more weird things I have experienced
> with idl.
>
> When I use the 'convert_coord' function, it doesnt seem though as the
> problematic points are outside the plotting area (device coordinates
> are larger than 0).
>
> Has anybody any similar experiences?

I've seen weird things with the Z-buffer, too.
One of the things I do as a rule is set !P.Charsize to 1
when I enter the Z-buffer. This seems to make the buffer
environment consistent with my display device. Since the problem
you describe seems to have something to do with sizes,
I would give this a try. Couldn't hurt. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Quantile
Next Topic: Parameters for Dummies

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

Current Time: Wed Oct 08 14:56:29 PDT 2025

Total time taken to generate the page: 0.00592 seconds