octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44567] Qt graphics toolkit displays twice whe


From: Rik
Subject: [Octave-bug-tracker] [bug #44567] Qt graphics toolkit displays twice when opening a new figure via plot or image.
Date: Wed, 18 Mar 2015 18:34:19 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0

Update of bug #44567 (project octave):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

The root cause is in image.m.


 h = __go_image__ (hax, "cdata", img, "xdata", xdata, "ydata", ydata,
                         "cdatamapping", "direct", varargin{:});

  if (do_new && ! ishold (hax))
    ## Set axis properties for new images

    if (! isempty (img))
      if (isscalar (get (hax, "children")))
        axis (hax, "tight");
      endif


The image is drawn by __go_image__ which apparently uses automatic scaling of
the axes limits.  This is appropriate for ordinary data plots, but not for
images where the axis should just contain the object.  So, the next thing the
m-file does is apply 'axis (hax, "tight")', but only if it is a new figure
(do_new).

Incidentally, I get a doubly drawn image with both the FLTK and Qt toolkits.

I pushed a cset to fix this
http://hg.savannah.gnu.org/hgweb/octave/rev/2e7497ff2535.

Using test code:


tic; image(32*rand(5000,1000)); toc


I find the previous implementation took 3.4 second while the new one takes 0.6
seconds.

I didn't see any problems with other image demos so I don't think it impacted
the correctness of the function.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44567>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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