Lasse Clausen wrote:
> On 26 Feb, 16:28, David Fanning <n...@[EMAIL PROTECTED]
> wrote:
> > Lasse Clausen writes:
> > > I get from time to time the following error message:
> >
> > > IDL: PLOT: Not enough valid and unique points specified.
> > > IDL: Execution halted at: PLOT_ACE_MFI 76 /home/lbnc1/idl_lib/
> > > graphics/plot_ace_mfi.pro
> > > IDL: $MAIN$
> > > IDL: Program caused arithmetic error: Floating illegal operand
> >
> > > Is there a simple way (maybe a compile_opt?) so that this is not an
> > > error and that execution of the program does not stop? Just warn me,
> > > plot an empty coordinate system and continue.
> >
> > Could be time to learn about that CATCH error handling
> > built into IDL. ;-)
> >
> > Cheers,
> >
> > David
> >
> > --
> > David Fanning, Ph.D.
> > Fanning Software Consulting, Inc.
> > Coyote's Guide to IDL Programming:http://www.dfanning.com/
> > Se****e ma de ni thui. ("Perhaps thou speakest truth.")
>
> Didn't think of error handling since I still don't think it's an
> error. Good old "I don't see, therefore it's not there"-approach...
>
> Moempf, and even if I use CATCH I still need to include a certain
> block of code in every plot routine I have - and all that to catch an
> error that isn't one. So what if I want to plot only NaNs?
You can split the plot command in two:
plot,[0,0],/nodata, [other graphic keywords]
oplot,x,y
this works even if x and y are array of NaNs!
Ciao,
Paolo
> How's that
> different from wanting to divide by zero or by NaNs? Which, I might
> add here, will not produce an error.
>
> Not happy
> Lasse Clausen


|