octave-maintainers
[Top][All Lists]
Advanced

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

Re: Comparing plots to Matlab


From: John W. Eaton
Subject: Re: Comparing plots to Matlab
Date: Thu, 2 Dec 2010 04:19:47 -0500

On  2-Dec-2010, John W. Eaton wrote:

| On  1-Dec-2010, Michael D Godfrey wrote:
| 
| | There is definitely a lot of randomness in this problem.  The only
| | fairly reliable choice that I know of is to run locally and
| | break up sequences into a few plots each.
| |  Do you get the "GL2PS error: Bad file pointer"
| | error? or something else?
| 
| No, I just don't get any .png files.
| 
| I'm trying to see if I can find out why now.

OK, I see now that when figures are not visible, the FLTK backend is
not creating any figure windows at all, so when we end up in the
figure_manager::do_print function there are apparently no windows at
all so nothing happens:

  void do_print (int idx, const int fid,  const std::string& term)
  {
    wm_iterator win;
    if ((win = windows.find (idx)) != windows.end ())
      {
        win->second->print (fid, term);
      }
  }

This isn't a problem for the gnuplot backend because it doesn't
require a window for the renderer to work.

I'm not sure what the proper fix is.  Should we create hidden windows,
or should it somehow be possible to generate the PS file without a
figure window?  I don't know enough about FLTK+OpenGL to answer that
so I could use some help here.

I think we currently create a figure handle for invisible figures, but
then Fdrawnow in graphics.cc skips calling the backend drawnow
function unless the figure is modified and visible, and the FLTK
backend redraw_figure function is where the FLTK plot windows are
created.  So, should we always call the backend redraw_figure function
and pass it the modified and visible functions?  Would it be
sufficient to only call redraw_figure if the figure is modified and
pass only the visible flag?  I don't have time at the moment to
experiment any further.

Fixing this probably won't solve the "Bad file pointer problem", but
it's a start...

jwe


reply via email to

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