help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnuplot zoom not functioning anymore in octave 2.9.10


From: Ethan A Merritt
Subject: Re: gnuplot zoom not functioning anymore in octave 2.9.10
Date: Sun, 8 Apr 2007 18:08:13 -0700
User-agent: KMail/1.8.2

On Sunday 08 April 2007 13:36, Petr Mikulik wrote:

> octave does no longer use temporary data files but switched 
> to inline data. That's a nice improvement. Unfortunately, gnuplot
> ignores "replot" for plots with "-", and consequently mousing+hotkeys do
> not work.
> 
> Thus, it looks like a strong demand to gnuplot developers to implement
> replot for "-". This matter was discussed recently, see below...
>
> Does somebody know how to implement it?

I am looking into it, but would appreciate help.  See below in particular.

The first thing that is needed is to change the order of allocating/freeing
the plot structures in eval_plots().  If we are to use the previously stored
data values, they must not be freed until an entirely new plot command 
replaces them.  Right now the plot structures are freed immediately after
drawing the plot.  We must change this so that they are freed only on 
re-entry to eval_plots().   There is a comment at the head of the routine
that suggests somebody tried this and ran into problems:

    /* Reset first_plot. This is usually done at the end of this function.
     * If there is an error within this function, the memory is left allocated,
     * since we cannot call cp_free if the list is incomplete. Making sure that
     * the list structure is always valid requires some rewriting */

I have prepared and attached a patch that switches the calls to cp_free()
from late in the routine to the front (where the above comment now sits).
The comment seems to warn this will break things if there is an inconvenient
int_error() from the plot command.

==>   Everyone please apply the attached patch, then try to find and
==>   document any error cases so that we can fix them.   

Once the revised code in eval_plots() is stable again, we can experiment with
adding a short-cut path that calls eval_plots() directory without re-parsing
the command line and re-reading all the data.

        Ethan




> 
> Thu, 15 Mar 2007, gnuplot-beta <address@hidden>
> 
> > > Furthermore, it would be possible to do a more efficient job
> > > of "replot" in the core code that would benefit all terminals.
> > > Perhaps I am overlooking something, but I don't see any hard
> > > requirement to re-read the original data from a file on each
> > > replot command.  Yes, this is sometimes exactly what you want
> > > because you know the data has changed.  But more often you
> > > just want to redraw the plot with a different plot option,
> > > or zoom or view angle.  In these cases there should be enough,
> > > or almost enough, information already stored in the data structures
> > > from the previous plot.  Why re-read the data file when it is
> > > just storing the same information all over again?  This would in
> > > particular be of  plot '-', where it is very annoying to type in
> > > the same data all over again.
> >
> > Mousing in 3D -- rotating by mouse -- does not reread the data, but
> > uses those in the memory. It would be useful for those "-" to do the
> > same.
> >
> > Thus there could be two replots, e.g. replot and Replot, where the
> > second would not reread the data from disk.
> 

-- 
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742

Attachment: persistent_plot_data_08apr2007.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]