> I want to use Plotchart to plot charts for a data acquisition system
> running in the laboratory for several days.
> I am afraid that the great volume of data in memory can cause problems
> of slowness.
Will your chart also keep getting bigger? Probably not. In that case, you'd probably only want the latest x number of data points. This should be easy to manage and should not amount to too much memory. With each new measurement, you just keep a list of the most recent x number of points to plot.
Or, depending on the specifics, you can display the summary data and not each individual measurement. Again, your vector size is limited.
> I want to use Plotchart to plot charts for a data acquisition system
> running in the laboratory for several days.
> I am afraid that the great volume of data in memory can cause problems
> of slowness.
> How do I remove the memory data created by plotchart without having to
> restart the application.
> The command
> package forget Plotchart
> don't remove the commands of Plotchart
> and after the command
> namespace delete ::Plotchart
> I can not load the package again with
> package require Plotchart
> Any suggestions?
> Thanks,
> Marcos
In addition to DrS's suggestions, I can add (as author of Plotchart)
that Plotchart itself
does not keep the data in memory - the application is responsible for
that.
A source of memory consumption could be the canvas. To deal with that:
- the "plot" method of an xy-plot (and similarly for other types)
creates individual
canvas items. These might accumulate.
- the "plotlist" method on the other hand creates a limited number of
canvas items,
but these items may have a lot of coordinates. The memory
consumption will be a lot
smaller than for the "plot" method.
- the data items have several labels - both "data" and the data series
they belong to.
You can use that to remove items when they are no longer needed
without redrawing
the plot/chart. Consult the documentation for details.
> A source of memory consumption could be the canvas. To deal with that:
> - the "plot" method of an xy-plot (and similarly for other types)
> creates individual canvas items. These might accumulate.
The item IDs will certainly leak; they're Tk_Uids under the covers. Reuse if you can.
> - the "plotlist" method on the other hand creates a limited number of
> canvas items, but these items may have a lot of coordinates. The memory
> consumption will be a lot smaller than for the "plot" method.
> On 8 feb, 14:29, Marcos <c2o.pro...@gmail.com> wrote:
> > Dear,
> > I want to use Plotchart to plot charts for a data acquisition system
> > running in the laboratory for several days.
> > I am afraid that the great volume of data in memory can cause problems
> > of slowness.
> > How do I remove the memory data created by plotchart without having to
> > restart the application.
> > The command
> > package forget Plotchart
> > don't remove the commands of Plotchart
> > and after the command
> > namespace delete ::Plotchart
> > I can not load the package again with
> > package require Plotchart
> > Any suggestions?
> > Thanks,
> > Marcos
> In addition to DrS's suggestions, I can add (as author of Plotchart)
> that Plotchart itself
> does not keep the data in memory - the application is responsible for
> that.
> A source of memory consumption could be the canvas. To deal with that:
> - the "plot" method of an xy-plot (and similarly for other types)
> creates individual
> canvas items. These might accumulate.
> - the "plotlist" method on the other hand creates a limited number of
> canvas items,
> but these items may have a lot of coordinates. The memory
> consumption will be a lot
> smaller than for the "plot" method.
> - the data items have several labels - both "data" and the data series
> they belong to.
> You can use that to remove items when they are no longer needed
> without redrawing
> the plot/chart. Consult the documentation for details.
> Regards,
> Arjen
Thanks for the informations and the indication of the command
plotlist.
Rushed to solve my problem I did not pay attention to the method
plotlist.
Marcos
> On Feb 10, 10:36 am, Arjen Markus <arjen.markus...@gmail.com> wrote:
> > On 8 feb, 14:29, Marcos <c2o.pro...@gmail.com> wrote:
> > > Dear,
> > > I want to use Plotchart to plot charts for a data acquisition system
> > > running in the laboratory for several days.
> > > I am afraid that the great volume of data in memory can cause problems
> > > of slowness.
> > > How do I remove the memory data created by plotchart without having to
> > > restart the application.
> > > The command
> > > package forget Plotchart
> > > don't remove the commands of Plotchart
> > > and after the command
> > > namespace delete ::Plotchart
> > > I can not load the package again with
> > > package require Plotchart
> > > Any suggestions?
> > > Thanks,
> > > Marcos
> > In addition to DrS's suggestions, I can add (as author of Plotchart)
> > that Plotchart itself
> > does not keep the data in memory - the application is responsible for
> > that.
> > A source of memory consumption could be the canvas. To deal with that:
> > - the "plot" method of an xy-plot (and similarly for other types)
> > creates individual
> > canvas items. These might accumulate.
> > - the "plotlist" method on the other hand creates a limited number of
> > canvas items,
> > but these items may have a lot of coordinates. The memory
> > consumption will be a lot
> > smaller than for the "plot" method.
> > - the data items have several labels - both "data" and the data series
> > they belong to.
> > You can use that to remove items when they are no longer needed
> > without redrawing
> > the plot/chart. Consult the documentation for details.
> > Regards,
> > Arjen
> Thanks for the informations and the indication of the command
> plotlist.
> Rushed to solve my problem I did not pay attention to the method
> plotlist.
> Marcos
Well, plotlist is a relatively new one :), it is meant for speed, it
was
not designed for minimizing memory usage - that is merely a convenient
consequence.