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

Home » Public Forums » archive » SUMMARY: oplot - error in plotting to Z buffer only
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
SUMMARY: oplot - error in plotting to Z buffer only [message #14293] Fri, 12 February 1999 00:00
fireman is currently offline  fireman
Messages: 49
Registered: August 1991
Member
THE PROBLEM:

An error sometines arises when plotting to the Z-buffer:
% PLOT: No valid points, must have at least 2 distinct points

AN EXAMPLE:

IDL> ; first, compile the function CIRCLE at the end of this message
IDL> usersym,circle(0,0,1,20),/fill
IDL> plot,psym=8,yrange=[0,1],-0.01+FIndGen(100)/5000
IDL> set_plot,'z'
IDL> plot,psym=8,yrange=[0,1],-0.01+FIndGen(100)/5000

A SUSPECT:

It seems to have something to do with improper clipping to plot
boundaries when using filled user-defined symbols. Setting !P.Clip = 0
prevents the error but doesn't always result in desirable plots.

A WORKAROUND:

IDL> ;After setting plot boundaries with an initial plot,
IDL> clip = where( (x gt !x.crange[0]) and (x lt !x.crange[1]) $
IDL> and (y gt !y.crange[0]) and (y lt !y.crange[1]) )
IDL> oplot, x[clip], y[clip]

THE SOLUTION:

Upgrade to IDL 5.2

CREDITS:

Eduardo Santiago <esm@lanl.gov> for first pointing out the filled
psym/p.clip connection

Dick Jackson <djackson@dfanning.com> for giving a simple example, and for
pointing out that IDL 5.2 has corrected the problem.

Gwyn Fireman <Gwyn.Fireman@gsfc.nasa.gov> (me) for posting the workaround.

Thanks everyone!
--
---- Gwyn F. Fireman
---- General Sciences Corporation
---- MODIS Characterization Support Team
---- Gwyn.Fireman@gsfc.nasa.gov 301-352-2118
[Message index]
 
Read Message
Previous Topic: Re: SUMMARY: oplot - error in plotting to Z buffer only
Next Topic: Re: DICOM3 read/write module with AVS and/or IDL ?

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

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

Total time taken to generate the page: 0.00420 seconds