Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
On Jul 10, 10:15 am, humanumbre...@gmail.com wrote: > hi ~~ > > ok , so I have a question. > > Trying to get animated line plot in iplot. > I can't get it to overwrite what's in iplot without the overplot > keyword, which is not what I want anyway because I only want one line > instead of 2. > > ie, > iplot, x > ;modify x > iplot, x > -- this creates 2 windows, I only want one. > > plot, x > ;modifiy x > plot, x > does exactly what I want, except it's in plot not iplot O_O > > So, it should be iplot with only one line at all time, but that line > is changing. > Thanks in advance! > --Justin I think you will need to set the data on the data object displayed. Try: pro iplot_animation_demo ; read in some data data = randomu(seed, 512) ; create original iTool (getting ID for later use) iplot, findgen(512), data, identifier=idPlotTool itcurrent, idPlotTool id = itGetCurrent(tool=oPlotTool) ; save Plot Vis' ID so we can come back to it later idPlotVis = oPlotTool->findIdentifiers('*plot', /visualizations, count=count) oPlotVis = oPlotTool->getByIdentifier(idPlotVis) for i = 0, 99L do begin oDataX = oPlotVis->getParameter('Y') success = oDataX->setData(randomu(seed, 512)) endfor end Mike -- www.michaelgalloy.com Tech-X Corporation Software Developer II
On Jul 10, 2:03 pm, "mgal...@gmail.com" <mgal...@gmail.com> wrote: > On Jul 10, 10:15 am, humanumbre...@gmail.com wrote: > > > >> hi ~~ > >> ok , so I have a question. > >> Trying to get animated line plot in iplot. >> I can't get it to overwrite what's in iplot without the overplot >> keyword, which is not what I want anyway because I only want one line >> instead of 2. > >> ie, >> iplot, x >> ;modify x >> iplot, x >> -- this creates 2 windows, I only want one. > >> plot, x >> ;modifiy x >> plot, x >> does exactly what I want, except it's in plot not iplot O_O > >> So, it should be iplot with only one line at all time, but that line >> is changing. >> Thanks in advance! >> --Justin > > I think you will need to set the data on the data object displayed. > Try: > pro iplot_animation_demo > ; read in some data > data = randomu(seed, 512) > > ; create original iTool (getting ID for later use) > iplot, findgen(512), data, identifier=idPlotTool > > itcurrent, idPlotTool > id = itGetCurrent(tool=oPlotTool) > > ; save Plot Vis' ID so we can come back to it later > idPlotVis = oPlotTool->findIdentifiers('*plot', /visualizations, > count=count) > oPlotVis = oPlotTool->getByIdentifier(idPlotVis) > > for i = 0, 99L do begin > oDataX = oPlotVis->getParameter('Y') > success = oDataX->setData(randomu(seed, 512)) > endfor > end > > Mike > --www.michaelgalloy.com > Tech-X Corporation > Software Developer II Mike -- Cheers my friend, it works. I will now attempt to modify it to work for my code, I'll let you know! (: Thanks~!~ --Justin