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

Home » Public Forums » archive » cgPlot equivalent to graphic = PLOT(Equation,... ?
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
cgPlot equivalent to graphic = PLOT(Equation,... ? [message #90322] Fri, 20 February 2015 00:52 Go to next message
Jonas Ardo is currently offline  Jonas Ardo
Messages: 12
Registered: April 2014
Junior Member
Hi

Is there a cgPlot equivalent to:

graphic = PLOT(Equation, [Format] [, Keywords=value] [, Properties=value])

I.e. how do I formulate
IDL> p = PLOT('X * 20 -1.', XRANGE=[0,1])

using cgPlot?


Regards

/Jonas
Re: cgPlot equivalent to graphic = PLOT(Equation,... ? [message #90323 is a reply to message #90322] Fri, 20 February 2015 04:52 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 20.02.2015 09:52, Jonas Ardo wrote:
> I.e. how do I formulate
> IDL> p = PLOT('X * 20 -1.', XRANGE=[0,1])
>
> using cgPlot?

cgPlot, FINDGEN(101)/100 * 20 - 1

Cheers,

Fabien
Re: cgPlot equivalent to graphic = PLOT(Equation,... ? [message #90325 is a reply to message #90323] Fri, 20 February 2015 07:29 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Friday, February 20, 2015 at 5:52:14 AM UTC-7, Fabien wrote:
> On 20.02.2015 09:52, Jonas Ardo wrote:
>> I.e. how do I formulate
>> IDL> p = PLOT('X * 20 -1.', XRANGE=[0,1])
>>
>> using cgPlot?
>
> cgPlot, FINDGEN(101)/100 * 20 - 1
>
> Cheers,
>
> Fabien

But this won't give you the fancy equation feature. You won't be able to zoom or pan around in the plot and have it automatically update. To do this with "cg" you would need to have some sort of event handler, and then manually update the data or something.

Advantage, new graphics. ;-)

-Chris
Re: cgPlot equivalent to graphic = PLOT(Equation,... ? [message #90326 is a reply to message #90325] Fri, 20 February 2015 07:34 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Chris Torrence writes:

> But this won't give you the fancy equation feature. You won't be able to zoom or pan around in the plot and have it automatically update. To do this with "cg" you would need to have some sort of event handler, and then manually update the data or something.
>
> Advantage, new graphics. ;-)

If you want to zoom or pan around, you have to use cgZPlot:

cgZPlot, FINDGEN(101)/100 * 20 - 1

No doubt, you could figure out how to override the event handing there.
:-)

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.")
Re: cgPlot equivalent to graphic = PLOT(Equation,... ? [message #90327 is a reply to message #90326] Fri, 20 February 2015 07:59 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 02/20/15 10:34, David Fanning wrote:
> Chris Torrence writes:
>
>> But this won't give you the fancy equation feature. You won't be
>> able to zoom or pan around in the plot and have it automatically
>> update. To do this with "cg" you would need to have some sort of
>> event handler, and then manually update the data or something.
>>
>> Advantage, new graphics. ;-)
>
> If you want to zoom or pan around, you have to use cgZPlot:
>
> cgZPlot, FINDGEN(101)/100 * 20 - 1
>
> No doubt, you could figure out how to override the event handing
> there. :-)

Oooo..... I think that qualifies as "deuce".

Ha ha! :o)

cheers,

paulv
Re: cgPlot equivalent to graphic = PLOT(Equation,... ? [message #90328 is a reply to message #90327] Fri, 20 February 2015 11:33 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Friday, February 20, 2015 at 8:59:13 AM UTC-7, Paul van Delst wrote:
> On 02/20/15 10:34, David Fanning wrote:
>> Chris Torrence writes:
>>
>>> But this won't give you the fancy equation feature. You won't be
>>> able to zoom or pan around in the plot and have it automatically
>>> update. To do this with "cg" you would need to have some sort of
>>> event handler, and then manually update the data or something.
>>>
>>> Advantage, new graphics. ;-)
>>
>> If you want to zoom or pan around, you have to use cgZPlot:
>>
>> cgZPlot, FINDGEN(101)/100 * 20 - 1
>>
>> No doubt, you could figure out how to override the event handing
>> there. :-)
>
> Oooo..... I think that qualifies as "deuce".
>
> Ha ha! :o)
>
> cheers,
>
> paulv

Yes, but we all LOVE IDL.
-C
Re: cgPlot equivalent to graphic = PLOT(Equation,... ? [message #90329 is a reply to message #90328] Fri, 20 February 2015 11:49 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 02/20/15 14:33, Chris Torrence wrote:
> On Friday, February 20, 2015 at 8:59:13 AM UTC-7, Paul van Delst wrote:
>> On 02/20/15 10:34, David Fanning wrote:
>>> Chris Torrence writes:
>>>
>>>> But this won't give you the fancy equation feature. You won't be
>>>> able to zoom or pan around in the plot and have it automatically
>>>> update. To do this with "cg" you would need to have some sort of
>>>> event handler, and then manually update the data or something.
>>>>
>>>> Advantage, new graphics. ;-)
>>>
>>> If you want to zoom or pan around, you have to use cgZPlot:
>>>
>>> cgZPlot, FINDGEN(101)/100 * 20 - 1
>>>
>>> No doubt, you could figure out how to override the event handing
>>> there. :-)
>>
>> Oooo..... I think that qualifies as "deuce".
>>
>> Ha ha! :o)
>>
>> cheers,
>>
>> paulv
>
> Yes, but we all LOVE IDL.

I know, I know.

:o)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: A Calculus-level language, FortranCalculus, Compiler for Tweaking Parameters.
Next Topic: [start:final:step] bug

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

Current Time: Wed Oct 08 09:13:34 PDT 2025

Total time taken to generate the page: 0.00489 seconds