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

Home » Public Forums » archive » Re: How to clear an object 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
Re: How to clear an object plot [message #72785] Tue, 05 October 2010 15:18
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Jean writes:
>
>> And David, I'm looking forward for the 3rd edition of your book and
>> especially the chapter about 'New Graphic'.
>
> You know, it's a race to see if I can get an income
> producing book done before the sheriff shows up at
> the door, ready to clamp me in irons and haul me off
> to the poor farm. In doing that calculus, a book
> on the "New Graphics" didn't really finish high
> on the list of books that are likely to make me
> enough money to buy a latte again. :-)

Once my CC balance recovers from my recent online buying frenzy at Zappos, I'll be sure to send some $$ your website's
way. I have been living off the teat of David Fanning (and Mike Galloy too for that matter) for too long.

cheers,

paulv

>
> I'm starting with something more widely used
> in the IDL community and, like the rest of
> you, waiting for the New Graphics to mature
> a bit. Eventually, I can see a need for a book
> like that.
>
> Let's just say I haven't seen any evidence that
> anyone outside of ITTVIS can actually *program* a
> new graphics routine, although they are becoming a
> great deal easier to use. It's unclear to me how
> useful they will be for doing, say, science, but
> I'm hoping to be convinced.
>
> In principle, since the new graphics routines are
> written in the IDL language, you might see the IDL
> community stepping in to fix all these bugs themselves,
> as a gigantic service project. But, in practice, I
> don't see anyone doing it. I've had a look, but I don't
> have that many years left the chase around that maze
> of code.
>
> Cheers,
>
> David
>
> P.S. Let's just say I'm glad I'm not the one charged
> with fixing mirror image contour labels! I wouldn't
> have a clue where to begin. :-)
>
Re: How to clear an object plot [message #72786 is a reply to message #72785] Tue, 05 October 2010 15:13 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:
> Paulo Penteado writes:
>
>> I had not noticed it was not in the help. But I think I first saw it
>> on some ITTVIS presentation.
>>
>> Indeed the help is still scarce on all the methods, properties and
>> objects of NG (as it already was for the iTools).
>
> Yes, tell me about it. But not just for the NG. I was
> looking for information on Label_Date last night and
> I couldn't even find *that* in the IDL 8 documentation!

Ha ha! Isn't it strange that the two things for which IDL is supposedly best known -- data visualisation and simplicity
of use ("says who?" I hear you say :o) -- are the two things that regular users complain about the most via the
seemingly constant changes in the graphics and help systems! :o)

cheers,

paulv
Re: How to clear an object plot [message #72787 is a reply to message #72786] Tue, 05 October 2010 13:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jean writes:

> And David, I'm looking forward for the 3rd edition of your book and
> especially the chapter about 'New Graphic'.

You know, it's a race to see if I can get an income
producing book done before the sheriff shows up at
the door, ready to clamp me in irons and haul me off
to the poor farm. In doing that calculus, a book
on the "New Graphics" didn't really finish high
on the list of books that are likely to make me
enough money to buy a latte again. :-)

I'm starting with something more widely used
in the IDL community and, like the rest of
you, waiting for the New Graphics to mature
a bit. Eventually, I can see a need for a book
like that.

Let's just say I haven't seen any evidence that
anyone outside of ITTVIS can actually *program* a
new graphics routine, although they are becoming a
great deal easier to use. It's unclear to me how
useful they will be for doing, say, science, but
I'm hoping to be convinced.

In principle, since the new graphics routines are
written in the IDL language, you might see the IDL
community stepping in to fix all these bugs themselves,
as a gigantic service project. But, in practice, I
don't see anyone doing it. I've had a look, but I don't
have that many years left the chase around that maze
of code.

Cheers,

David

P.S. Let's just say I'm glad I'm not the one charged
with fixing mirror image contour labels! I wouldn't
have a clue where to begin. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to clear an object plot [message #72789 is a reply to message #72787] Tue, 05 October 2010 12:55 Go to previous message
Jean[2] is currently offline  Jean[2]
Messages: 41
Registered: October 2010
Member
Thanks a lot David and Paulo. That's exactly what I was looking for.

And David, I'm looking forward for the 3rd edition of your book and
especially the chapter about 'New Graphic'.
And you didn't even started your beer when you mentioned it, so that
can't be an excuse :-)

Jean
Re: How to clear an object plot [message #72792 is a reply to message #72789] Tue, 05 October 2010 11:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paulo Penteado writes:

> I had not noticed it was not in the help. But I think I first saw it
> on some ITTVIS presentation.
>
> Indeed the help is still scarce on all the methods, properties and
> objects of NG (as it already was for the iTools).

Yes, tell me about it. But not just for the NG. I was
looking for information on Label_Date last night and
I couldn't even find *that* in the IDL 8 documentation!

I've decided to write my own set of "Coyote's Guide to ..."
books so I can at least find the things I'm looking for!
I hope to have the first one ready in a month or so.

In the meantime, I *had* written an article about this,
but had got my web page so screwed up moving repositories
around that I didn't know it. :-(

I think I've sorted it out now. But Matt Haffner sent me
some additional information about changing the data in
a graphics object, so I have updated the page with that.
Basically, if you want to change the data in a 2D or
3D plot, you have to pass a 2xN or 3xN array as the
argument to PutData.

You can find the article here.

http://www.dfanning.com/ng_tips/newimage.html

Cheers,

David

P.S. I've had several people send me a heads-up recently
about articles or programs I've written. I just want to
say again how much I appreciate that. I try hard to
get things right, but the only way to really make it happen
is to have many eyeballs looking over my shoulder. :-)


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to clear an object plot [message #72794 is a reply to message #72792] Tue, 05 October 2010 10:57 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Oct 5, 2:39 pm, David Fanning <n...@dfanning.com> wrote:
> I think you missed the undocumented method PutData. ;-)
>
>    _p.PutData, newdata

I had not noticed it was not in the help. But I think I first saw it
on some ITTVIS presentation.

Indeed the help is still scarce on all the methods, properties and
objects of NG (as it already was for the iTools).
Re: How to clear an object plot [message #72795 is a reply to message #72794] Tue, 05 October 2010 10:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jean writes:

>
> Hi again,
>
> #1 I'm calling the new IDL 8.0 plot feature object plot has an
> official name has been found for this guy ? :-)

New Graphics (NG), I think. :-)

> #2 I'm creating a very simple plot
>> _p = plot(indgen(10))
> but now I want to very quickly display another using the same _p
> window. Closing this one and creating a new one won't work because I
> need to do this at a very high rate.
>
> To get the full story, I have an application that shows a 2d image
> (using tvscl). When the user moves his mouse over this image, the z vs
> x and z vs y are plotted in 2 differents plot objects.
>
> I tried to use _p.select and _p = plot(<new plot>) but this plots the
> new data on top of the old one.
>
> Am I missing something here ?

I think you missed the undocumented method PutData. ;-)

_p.PutData, newdata

Cheers,

David

P.S. I've been meaning to write an article about this, but
I've gotten caught up in another project. Maybe soon now.

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to clear an object plot [message #72796 is a reply to message #72795] Tue, 05 October 2010 10:36 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Oct 5, 2:06 pm, Jean <jeanbilh...@gmail.com> wrote:
> #1 I'm calling the new IDL 8.0 plot feature object plot has an
> official name has been found for this guy ?  :-)

The official name is Graphics. But people often call them New Graphics
(NG), to distinguish from Direct Graphics (DG) and Object Graphics (OG
- in the sense of handling OG directly, since NG is made from OG
objects).

> #2 I'm creating a very simple plot> _p = plot(indgen(10))
>
> but now I want to very quickly display another using the same _p
> window. Closing this one and creating a new one won't work because I
> need to do this at a very high rate.
>
> To get the full story, I have an application that shows a 2d image
> (using tvscl). When the user moves his mouse over this image, the z vs
> x and z vs y are plotted in 2 differents plot objects.
>
> I tried to use _p.select and _p = plot(<new plot>) but this plots the
> new data on top of the old one.

I think what you want is to replace the data in the plot. If so, you
could use the putdata method. An example:


IDL> p=plot(/test) ;Make some plot with the example data
% Loaded DLM: XML.
IDL> d=p.data ;Retrieve the data in the plot
IDL> help,d
D FLOAT = Array[3, 200]
IDL> d=d[*,0:50]*2d0 ;Make some new data for the plot
IDL> p.putdata,d ;Replace the plot data
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to clear an object plot
Next Topic: Re: Setting the IDL Path

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

Current Time: Wed Oct 08 13:48:31 PDT 2025

Total time taken to generate the page: 0.00754 seconds