bugGNU Octave - Bugs: bug #44323, Zooming in 3D plots works on XY...


bug #44323: Zooming in 3D plots works on XY plane rather than projection plane

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Fri 20 Feb 2015 12:42:03 PM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 23 Dec 2016 07:04:18 PM UTC, comment #5:

This behavior is still present in Octave 4.2.0.

Hartmut <hardy>
Thu 12 Mar 2015 06:03:24 PM UTC, comment #4:

@Philip: I agree with your comment #2. It is visually more appealing if all three axes--x, y, and z-- are changed together so that 3-D objects are not distorted on zooming.

It's very easy to see the issues with the following code:

Rik <rik5>
Project Administrator
Mon 02 Mar 2015 10:35:34 PM UTC, comment #3:

FTR, I've attached a pic of what ML does when zooming in and out:
it leaves the XYZ axes limits untouched, it only zooms in/out on the picture itself. It does clip axes limits to the graph window borders.

Whether that is what we want for zooming out, I'm not sure; I see little use for just a very small graph in a relatively large plot window.
I'd rather have the axis limits be adapted isomorphously, ~ like Octave does but for all 3 axes.

(file #33233, file #33234)

Philip Nienhuis <philipnienhuis>
Project Member
Mon 02 Mar 2015 10:20:13 PM UTC, comment #2:

I'm sorry I wasn't clear enough. I'll try again.

With "projection plane" I mean this: any 3D-object is obviously projected to a 2D plane when drawn on a screen.

I've attached 3 pics of the command
plot3 ([0 1], [0 1], [0 1], "r", "linewidth", 3)

In the first all three axes (XYZ) extend from 0-1.
In the second (zoomed out) plot, only the X- and Y-axes have been zoomed out (larger range limits), the Z-axis limits are still [0 1].
Same goes for the 3rd pic (zoomed in), where the X_ and Y-axis are zoomed in but the Z-axis limits again remain to be [0 1].

It may be even easier to simply zoom out on the 3D-plot made by the sombrero command. The plot will be stretched in the Z-direction, as the Z-axis limits remain to be [0 1].

My conclusion is that zooming in and out only works on the X and Y axes, but ignores the Z-axis.

As stated in the original report, Matlab zooms in/out on all 3 axes for 3D graphs.

I think this ML-incompatible behavior has been there for a very long time.

(file #33230, file #33231, file #33232)

Philip Nienhuis <philipnienhuis>
Project Member
Fri 27 Feb 2015 03:07:58 PM UTC, comment #1:

I don't understand what you mean by "zooms in/out on the plane on which the rotated 3D-plot is projected".

I need a patch that does this job, or a detailed description of exactly what is supposed to happen.

John W. Eaton <jwe>
Project Administrator
Fri 20 Feb 2015 12:42:03 PM UTC, original submission:

(Singling out this one from bug #44307)

Zooming in/out of (rotated) 3D plots works only on the XY plane. As a consequence the picture gets distorted in the Z-direction.

Matlab zooms in/out on the plane on which the rotated 3D-plot is projected, as I would expect.

It can easily be seen doing:

plot3 ([0 1], [2 3], [4 5]);

rotate the plot a little,

and zoom in/out.

Philip Nienhuis <philipnienhuis>
Project Member


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

Attach Files:

Attached Files
file #33233:  zoomoutML.png added by philipnienhuis (10KiB - image/png)
file #33234:  zoominML.png added by philipnienhuis (39KiB - image/png)
file #33230:  prezoom1.png added by philipnienhuis (13KiB - image/png)
file #33231:  zoomout1.png added by philipnienhuis (16KiB - image/png)
file #33232:  zoomin1.png added by philipnienhuis (17KiB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-12 rik5 StatusNone => Confirmed
    2015-03-02 philipnienhuis Attached File- => Added zoomoutML.png, #33233
        Attached File- => Added zoominML.png, #33234
    2015-03-02 philipnienhuis Attached File- => Added prezoom1.png, #33230
        Attached File- => Added zoomout1.png, #33231
        Attached File- => Added zoomin1.png, #33232

    Back to the top

    Powered by Savane 3.3