bugGNU Octave - Bugs: bug #52631, Add horizontal and vertical zoom...


bug #52631: Add horizontal and vertical zoom controls

Submitted by:  Marshall <marsian>
Submitted on:  Sun 10 Dec 2017 06:52:16 AM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Marsian Open/Closed:  Open
Release:  4.2.1 Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

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


Wed 26 Sep 2018 05:17:13 PM UTC, comment #3:

Thanks! That gives me a way to do what I want when I really need it. I didn't realize 'zoom xon' and 'zoom yon' were already available because I was looking for that functionality through the figure gui interface.

Both uimenu and uicontextmenu are helpful, but I don't know of a way to create them with every new figure. I though of setting groot uicontextmenu or attaching a uimenu to groot so that new figures would have them by default, but that doesn't work. It would be nice to have a way to set this up in a startup script so it's always automatically available.

I noticed another convenient way of accessing x or y zoom controls in recent versions of Matlab: When the zoom drag window is very narrow (e.g. nearly horizontal or vertical), then x or y zoom is activated. The zoom box changes to something that looks like a horizontal or vertical error bar to indicate that an x or y zoom will occur. It is a very simple (to use) way to access that functionality for zooming in, though it doesn't help for zooming out in x or y only.

Marshall <marsian>
Wed 26 Sep 2018 02:05:13 PM UTC, comment #2:

If what you want is a way to have x or y only zoom then look at "help zoom" and you'll see that e.g. "zoom yon" will only allow zoom to act on y coordinates (doesn't work with gnuplot).

If what you want is a way to interactively select this with mouse, it is easy to implement through a uicontextmenu and/or a uimenu.

Pantxo Diribarne <pantxo>
Project Member
Tue 25 Sep 2018 05:04:21 PM UTC, comment #1:

I found a bigger reason why horizontal and vertical zoom is more than just convenient: I had several plots with linked axes via linkaxes(...,'x'). In this case they all had different y scales, but corresponded in x (thus linked in x on zoom and pan). But I frequently found that after zooming into the right region on one plot the other was outside of the view, requiring me to zoom out (both x and y) to see the data and then zoom in again to the right region. With a vertical zoom, I could have then zoom in and out on one plot without affecting all the other plots that were already correctly zoomed in on the x axis.

Marshall <marsian>
Sun 10 Dec 2017 06:52:16 AM UTC, original submission:

It would be nice to add horizontal and vertical zoom options to the plot figure controls. This is a nice feature implemented in matlab (by a right click option probably after selecting zoom in the figure widow if I remember correctly. It is convenient for maintaining x or y limits while zooming; whereas otherwise, if the axis limits are fit to the data, I typically end up cutting a little off the top or bottom of the data using a box zoom on the first zoom because zoom only starts by clicking inside the axis ( though it can end outside the axis thus allowing some of the data range to be gained back on a second box zoom).

Marshall <marsian>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by marsian (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.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.3