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

Home » Public Forums » archive » conditional plot
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
conditional plot [message #87692] Sun, 23 February 2014 12:52 Go to next message
Nims is currently offline  Nims
Messages: 8
Registered: February 2014
Junior Member
Hello everyone
I want to do a conditional overplot like

if a eq 'A' and b eq 'B' then not oplot,x,y

I mean that if the two conditions are satisfied then don't do the overplot. How can I do this? Could someone please help me?

Thank you in advance
Re: conditional plot [message #87695 is a reply to message #87692] Sun, 23 February 2014 15:14 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Sunday, February 23, 2014 1:52:24 PM UTC-7, Nims wrote:
> Hello everyone
>
> I want to do a conditional overplot like
>
>
>
> if a eq 'A' and b eq 'B' then not oplot,x,y
>
>
>
> I mean that if the two conditions are satisfied then don't do the overplot. How can I do this? Could someone please help me?
>
>
>
> Thank you in advance

Well, I can think of at least 2 ways:

; Reverse the logic!
if (a ne 'A' || b ne 'B') then oplot,x,y

; Dorky, but keeps the logic
if (a eq 'A' && b eq 'B') then begin
endif else begin
oplot,x,y
endelse

-Chris
Re: conditional plot [message #87697 is a reply to message #87692] Sun, 23 February 2014 15:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nims writes:

> I want to do a conditional overplot like
>
> if a eq 'A' and b eq 'B' then not oplot,x,y
>
> I mean that if the two conditions are satisfied then don't do the overplot. How can I do this? Could someone please help me?

IF (a NE 'A') OR (b NE 'B') THEN OPlot, x, y

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: The eventhandler Mechanism for basewidget.
Next Topic: possible cgContour bug

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

Current Time: Wed Oct 08 15:21:35 PDT 2025

Total time taken to generate the page: 0.00390 seconds