Re: oplot with colours [message #67538 is a reply to message #67483] |
Sun, 02 August 2009 19:31   |
b.a
Messages: 26 Registered: July 2009
|
Junior Member |
|
|
On Aug 1, 12:07 am, David Fanning <n...@dfanning.com> wrote:
> b.a writes:
>> In my program, there is a main widget which has "button1". each time
>> "button1" is pressed, a relevant file opens and according to the data
>> values in that file, a curve is plotted (actually Oplotted) on the
>> draw window. For each curve, there exists a "remove button". Now I
>> want to remove the relevant curve (plot) , whenever "remove button" is
>> clicked.
>
>> As far as I know if I use iplot, each time a curve is plotted, it
>> would be a new popup window.
>
> You haven't been here long enough to fully appreciate
> Coyote's sense of humor. (Sometimes he writes these
> articles while I'm playing tennis.) Ignore the iPlot
> suggestion. He was making a joke.
>
>> I don't know how to appear that window in
>> my GUI. and by the way I didn't understand "Draw the plot
>> over without that curve in it".
>
> Presumably you have a list of the things you have plotted
> in the window. (Maybe you made a pointer array or used
> a LinkedList or something, so you can re-draw them in
> the window, if needed.) To delete a plot, just remove
> it from that list and re-plot the rest of the items in
> the list. Or, maybe you have a flag of list indices, and
> you only plot the items in the list if the flag is set to
> 1. Something along those lines.
>
> Cheers,
>
> David
>
> --
> 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.")
Yea, I am using Hashtable to keep track of the data and removing the
selected plot and replotting it, should serve the purpose. I will try
that.
By the way, it takes time to understand Coyote's sense of humor :)
Thanks a lot.
Afra
|
|
|