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

Home » Public Forums » archive » How to access properties of multiple plots in a function graphics window?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to access properties of multiple plots in a function graphics window? [message #86493 is a reply to message #86490] Wed, 13 November 2013 13:20 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Then, I found I could do this without knowing the name of anything.
>
> win = window()
> p1 = plot(cgdemodata(17), color='red', /current)
> p2 = plot(cgdemodata(17), color='green', /overplot, /current)
> objs = cgGetObjects(win, ISA='IDLGRPLOT')
>
> Oddly, there are four plot objects in the window, not two. Maybe the
> other two are used for backing store? Not sure about that. Maybe Mark
> can help us understand this. But, in any case, there appear to be
> duplicates. Oddly, I can't do this:
>
> objs[0].color = 'blue'
> objs[2].color = 'orange'
>
> But, I can do this:
>
> objs[0] -> SetProperty, Color=cgColor('navy', /Triple, /Row)
> objs[2] -> SetProperty, Color=cgColor('orange', /Triple, /Row)
> win.refresh
>
> For what it is worth. :-)

I think what I should have been looking for are IDLVisPlots:

objs = cgGetObjects(win, ISA='idlitvisplot')

There are only two of those, and these are apparently the two plots you
want to work with:

objs[0] -> SetProperty, Color=cgColor('navy', /Triple, /Row)
objs[1] -> SetProperty, Color=cgColor('orange', /Triple, /Row)
win.refresh

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Array into binary array
Next Topic: PSYM=10 + POLYFILL = ?

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

Current Time: Fri Oct 10 09:38:18 PDT 2025

Total time taken to generate the page: 0.55979 seconds