bugGNU Octave - Bugs: bug #54079, After resizing, plotyy plots are...


bug #54079: After resizing, plotyy plots are clobbered up

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Thu 07 Jun 2018 09:12:34 AM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  philipnienhuis 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 08 Jun 2018 09:26:02 AM UTC, comment #4:

That gnuplot comment suggestion looks good, and indeed it shouldn't be in individual plot functions but rather in the toolkit docs.

BTW comparing wit 4.4.0 I see that automatic redrawing works with both 5.0.0 and 4.4.0 w. Qt but that 4.4.0 is much and much more responsive as to redrawing. 5.0.0 sometimes doesn't respond anymore and needs a nudge from the "Autoscale" button.
The response speed looks to be very highly dependent on the amount of data to be plotted.

So it looks like this bug is at least partly related to bug #54083

Philip Nienhuis <philipnienhuis>
Project Member
Fri 08 Jun 2018 07:35:30 AM UTC, comment #3:

Preferably it should be just a single set of X-axis ticks, not two identical copies.

gnuplot documentation for this issue? Mm, probably not. I don't think it makes sense to have toolkit-specific comments in the individual functions. I.e., why would we put a comment about gnuplot in the plotyy documentation, or any other fucntion documentation? Maybe in one of these

help graphics_toolkit
help help available_graphics_toolkits
help figure

there could be a general comment about "gnuplot toolkit is technically not interactive. Resizing gnuplot figures can drop figure components. If that is an issue for your application, change the gnuplot figure size and location via the Properties settings."

Dan Sebald <sebald>
Fri 08 Jun 2018 06:53:26 AM UTC, comment #2:

"demo plotyy 1" makes no difference.

AFAICS this happens with all the plotyy figures I made. The issue as far as I can infer it is that when resizing the plot window the x-axes aren't synchronously stretched but rather individually.
And yes plotyy creates two identical X-axes plotted on top of another. I'm not sure if that is the correct behavior - I suppose just one X-axis should do as he help for plotyy clearly says:
"Plot two sets of data with independent y-axes and a common x-axis."

Of course with some xlimits fiddling afterwards I suppose this bug can be corrected by the user; but my point is that users (IMO correctly) expect that when just resizing a plot window this should be taken care of automatically.

As to gnuplot: thanks, noted. Is it documented somewhere?

Philip Nienhuis <philipnienhuis>
Project Member
Thu 07 Jun 2018 09:01:08 PM UTC, comment #1:

The gnuplot toolkit result is a limitation of gnuplot and outside of Octave's control. Octave just sends gnuplot the data. gnuplot doesn't retain the full data, just the most recent data which happens to be only one function. It has to do with gnuplot's history and concept: every framework and output format is treated as an unsophisticated terminal. Looking at the plot, though, it looks like the layout has gotten messed up a bit. (I too have vague recollection of this being mentioned...maybe Rik said something about altering the plotyy such that gnuplot needs a minor fix.)

OpenGL: Your plot sure looks strange. I'm not seeing that in linux (Mint Cinnamon). The font of the x-axis ticks looks sort of bold, so it is probably the case that two axes are printed one on top of the other. Not surprisingly, your plots are offset to match the x-axes marks. Could you repeat this test with the following?

demo plotyy 1

I'm curious if having that suspended input prompt might have an influence.

Dan Sebald <sebald>
Thu 07 Jun 2018 09:12:34 AM UTC, original submission:

(I have some reminiscence of this having been reported earlier but I couldn't find reports about it in the bug tracker. Sorry if this is a duplicate.)

Redrawing plotyy plots result in clobbered-up plots.
For OpenGL and gnuplot the problems appear to be differently but I don't know if they are really different bugs.

Steps to reproduce:

demo plotyy
## Then stretch plot to make it wider, and click "Autoscale" button
==> result for OpenGL in first pic plotyy_x-axis_bug_OpenGL.png
The tick marks for the two X-axes are different and don't coincide.
Expected result: same X-axis tick positions for both subplots of plotyy

demo plotyy
## Stretch plot to make it wider, press "redraw" button
==> result for Gnuplot is in plotyy_x-axis_bug_gnuplot.png
There the entire plot is partly redrawn, only the "right side" subplot is redrawn.

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


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sebald (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-07 philipnienhuis Attached File- => Added plotyy_x-axis_bug_OpenGL.PNG, #44316
        Attached File- => Added plotyy_x-axis_bug_gnuplot.PNG, #44317

    Back to the top

    Powered by Savane 3.3