bugGNU Octave - Bugs: bug #53504, axis("equal") makes...

 
 

bug #53504: axis("equal") makes plot3 unusably small with graphics_toolkit("gnuplot")

Submitter:  None
Submitted:  Wed 28 Mar 2018 06:53:07 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Charlie Hagedorn Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 02 Feb 2019 06:25:51 AM UTC, comment #6: 

Fixed on the development branch in this cset: https://hg.savannah.gnu.org/hgweb/octave/rev/a7dfb00d5bf5.

This will be a part of the Octave 6.1 release.  To access the fix sooner download axis.m from the Mercurial development branch and replace your local copy.

Closing report.


Rik <rik5>
Group administrator
Wed 28 Mar 2018 08:19:56 PM UTC, comment #5: 

Ah, I see what you are getting at now.  With "equal" scaling on all axes, the [0,0.01] range is 1/100 the x scale.

The manner in which gnuplot works is that it centralizes the figure.  It isn't smart enough to know it could expand out the visual range and zoom a bit even if that means it has to offset (in this case) the y axis, whereas Qt toolkit at least makes better use of the screen area for the [0,1] range.  In other words, gnuplot is sort of an absolute relationship as far as the screen view, i.e., "scale: 1.00000, 1.00000", whereas Qt is more relative use of the screen view.

Does this seem like an Octave bug, or perhaps gnuplot?  We could attempt to compensate perhaps by generating a measure of


gnuplot_scale = min([ ...
  max([x_axis_range/y_axis_range y_axis_range/x_axis_range]) ...
  max([x_axis_range/z_axis_range z_axis_range/x_axis_range]) ...
  max([z_axis_range/y_axis_range y_axis_range/z_axis_range])];


or something similar.

Dan Sebald <sebald>
Wed 28 Mar 2018 07:52:28 PM UTC, comment #4: 

If the view point 60,300, would not be plot with axes 1 and 0.1 be shrunk to ~0 ?

Also qt plot looks normal to me  -- the small axis got
shrunk to the same scale as big axis.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 28 Mar 2018 07:46:25 PM UTC, comment #3: 

I'm not following Dmitri.  Yes, some view point infinite in z might be shrinking the axis to 0, but is it something in the footer printout that seems unusual, or what is your train of thought?

Dan Sebald <sebald>
Wed 28 Mar 2018 07:40:59 PM UTC, comment #2: 

Notice that the view point at the ~infinity (60, 322).
I think that might be the root cause.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Wed 28 Mar 2018 07:36:16 PM UTC, comment #1: 

Initially I was going to ask for a screen shot, but I see the issue.  As a slight aside, I know that gnuplot can do something like


linux@ ~ $ gnuplot

        G N U P L O T
        Version 5.3 patchlevel 0    last modified 2017-11-04

        Copyright (C) 1986-1993, 1998, 2004, 2007-2017
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        mailing list:     gnuplot-beta@lists.sourceforge.net
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'qt'
Options are '0 font "Sans,9"'
gnuplot> set view equal
gnuplot> splot sin(x+y)
gnuplot>


then use the center mouse button-click-drag left and right to change the scale.  So, in theory we should be able to adjust that.

But I look at the screen shot:

gnuplot_axis_equal_bug_Screenshot_from_2018-03-28_14-21-26.png

and I see in the footer that the scale is 1.0000, so this is nominal operating range.  The fact the plot is so tiny suggests that the border must be used up by something, be it a large title font, or large x/y/z label font.

That being said, the source of this problem seems more general than just gnuplot.  I'm also attaching the result of your command sequence for the Qt toolkit:

qt_opengl_axis_equal_bug_Screenshot_from_2018-03-28_14-23-21.png

Notice how it has the same issue, but perhaps not immediately obvious.  In the Qt OpenGL case, the z-axis looks to be scrunched to one pixel where the x and y-axis look reasonable.

As an observation, if for the gnuplot toolkit one uses that center-mouse-click-drag-left-or-right feature to zoom in on the axis equal plot, it looks similar to the Qt OpenGL plot where the x/y-axis is reasonable but the z-axis is still scrunched to a single pixel.

So at this point, I'd say there looks to be something generally wrong with the z-computation of the "axis equal" code.  As such, the category should be changed to just "Plotting".


Dan Sebald <sebald>
Wed 28 Mar 2018 06:53:07 PM UTC, original submission:  

Historically-usable scripts now have unusable functionality, as plots are impossibly small.

Code to reproduce:

graphics_toolkit("gnuplot")                                                    
                                                                               
plot3( [0;1], [0, 0.1], [0; 0.01])                                             
                                                                               
axis equal


The "axis equal" statement is essential to reproducing the bug.


This may be related to bug #53381, which appears to have a similar diminutive-size problem.

$ gnuplot --version
gnuplot 5.2 patchlevel 2

$ octave --no-init-file --version
GNU Octave, version 4.2.2

$ apt-cache show octave
Package: octave
Version: 4.2.2-1

(computer is an up-to-date Debian-testing box)

Thank you for looking into this :)!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by sebald (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-02 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2018-03-28 sebald Attached File- Added gnuplot_axis_equal_bug_Screenshot_from_2018-03-28_14-21-26.png, #43711
        Attached File- Added qt_opengl_axis_equal_bug_Screenshot_from_2018-03-28_14-23-21.png, #43712

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code