octave-maintainers
[Top][All Lists]
Advanced

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

Re: log plots and labels in fltk


From: Michael D Godfrey
Subject: Re: log plots and labels in fltk
Date: Sat, 30 Jan 2010 18:24:47 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1

On 01/30/2010 11:36 AM, Shai Ayal wrote:
On Thu, Jan 28, 2010 at 9:38 AM, John W. Eaton <address@hidden> wrote:
  
> On 28-Jan-2010, Shai Ayal wrote:
>
> | What I want is to have the input event hook function called periodically,
> | so that even during a long pause the figure windows remain
> | responsive.
>
> OK, I see.  In that case, I guess you should try using rl_read_key.
> I think you could distinguish between the user entering '\n' or a
> readline-generated '\n' by also checking rl_done (take a look at the
> implementation of rl_read_key in the readline sources).  Again, I'd
> prefer to have access to this readline variable wrapped in a
> command_editor member function.
    
This is currently way beyond my powers  - I do not have more than 40
minutes of uninterrupted time, and understanding the command_editor
class will probably take me more than that.

Meanwhile, the following changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/02ae72071221

should at least make  figure window redraw fully when pausing, i.e. in
the following line:
sombrero() ; pause

although this figure will not respond to any events (mouse, resize etc...)

Shai
  

Shai's patch does help.  But, at the pause the plot window does not get
refreshed (as he said).  So, it shows that either pause behavior needs to be
changed in ways that may not be appropriate for some uses, or  it may be
better to introduce a function that does something like this:

tchar = "xxx";
while(!strcmp(tchar,""))
    tchar=input(">>","s")
    eval(tchar);
    replot();
endwhile

It is worth noting that the plot window does get refreshed while waiting on
the input() command, so this actually works well.
This is just to express the idea.   Other suggestions??   Like, what should
the function be called and should it have any arguments?

In any case, something like this will work for me for now, and I will
try to stop nagging Shai quite so much...

Michael




reply via email to

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