bugGNU Octave - Bugs: bug #40333, print with legend modifies axis...


bug #40333: print with legend modifies axis position

Submitted by:  Stefan Mahr <dac922>
Submitted on:  Mon 21 Oct 2013 07:10:28 PM UTC  
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


(Jump to the original submission Jump to the original submission)

Fri 26 Feb 2016 09:44:15 PM UTC, comment #17:

@Ben: Changed bug category and summary as you suggested.

Rik <rik5>
Project Administrator
Wed 30 Dec 2015 02:09:56 AM UTC, comment #16:


Should the summary be changed to remove the reference to gnuplot?

The category as well?

Ben Abbott <bpabbott>
Project Member
Sun 15 Feb 2015 05:33:30 AM UTC, comment #15:

Some things have improved over the last year. I don't see the originally reported error of a shrinking axis/figure when using print with a legend. On the other hand, the bug described in comment #12 with FLTK is still present. This won't gate the 4.0 release.

Rik <rik5>
Project Administrator
Thu 14 Nov 2013 07:10:11 PM UTC, comment #14:

The results in comment #13 hold for my linux-system (ubuntu 12.04 64 bit). On windows (XP 32 bit, mxe-build cross compiled on linux) I get the following printing a figure with -depslatex:

  • gnuplot
    • gnuplot.exe in octave/bin: empty eps-file and an incomplete tex-file ending with \begin{picture}
    • externally installed gnuplot: complete eps-file and tex-file
  • fltk: print ignores -S parameter, only a part of the figure is printed, or nothing happens at all; I was not able to find out how to reproduce the single effects.
Torsten <ttl>
Project Member
Wed 13 Nov 2013 09:39:40 PM UTC, comment #13:

Currently (hg id b602014eeb54 tip @) I can use gnuplot to correctly print the whole figure (with -depslatex) whereas fltk only prints a part of it (as described in comment #12)

Torsten <ttl>
Project Member
Thu 24 Oct 2013 05:09:15 PM UTC, comment #12:

fltk is also affected when adding the -F option:

The resulting print_test.eps is attached. Also attached a test with -depslatex (same result).

(file #29461, file #29462)

Torsten <ttl>
Project Member
Thu 24 Oct 2013 04:19:16 PM UTC, comment #11:

Actually, it may be time to raise the priority
of the FLTK bug (cannot print without display)
so that FLTK can be used for the Manual.

Michael Godfrey <godfrey>
Thu 24 Oct 2013 04:12:46 PM UTC, comment #10:

Well, as long the docs can't be build with FLTK, I think gnuplot should have the same priority. For example: Look for 'interpderiv2.eps' or figure 29.1 in octave.pdf.

Stefan Mahr <dac922>
Thu 24 Oct 2013 03:44:27 PM UTC, comment #9:

I'm re-opening the bug report for gnuplot. gnuplot is no longer the default plotting engine so this won't gate the 3.8 release.

The shrinking problem is due to the fact that legend.m has to do even more weird contortions than for FLTK to support them.

I tried the size option "-S" with octave-3.6.4 and it produced awful results, different from what I get now, but still really bad. I'm not sure this feature has ever worked very well with gnuplot.

Rik <rik5>
Project Administrator
Thu 24 Oct 2013 11:04:57 AM UTC, comment #8:

Rik, did you try the gnuplot example below? I can confirm that the bug is fixed for fltk, but with gnuplot the bug still occurs.

I can confirm Torstens bug. Attached the resulting .eps file. In addition a screenshot (.png) of the plot after the print command.

(file #29456, file #29457)

Stefan Mahr <dac922>
Thu 24 Oct 2013 10:14:27 AM UTC, comment #7:

I still have problems when printing with the "size"-options but I am not sure if this is related to this bug.
Steps to reproduce:

The eps-file only contains the lower left part of the figure. When printig without legend or using fltk everything works as expected.

Torsten <ttl>
Project Member
Thu 24 Oct 2013 12:48:03 AM UTC, comment #6:

Thanks Rik. The bug was my fault. I had reversed the order of restoring the properties thinking that would restore things to their original state .... looks like I got it backwards

Ben Abbott <bpabbott>
Project Member
Thu 24 Oct 2013 12:17:32 AM UTC, comment #5:

I think I've fixed the problem with this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/4e225f952885). At any rate, the test script no longer shrinks the axes.

Rik <rik5>
Project Administrator
Tue 22 Oct 2013 04:22:33 PM UTC, comment #4:

Confirmed with hg id 132d9f543cc5. The problem is going to be in legend.m. There has always been issues returning the size of the axes to the original values when deleting or re-creating the legend object (such as for a fontsize change).

Rik <rik5>
Project Administrator
Tue 22 Oct 2013 03:18:54 PM UTC, comment #3:

I can confirm this with default 132d9f543cc5 (after fix of bug 40334)

Andreas Weber <andy1978>
Project Member
Mon 21 Oct 2013 08:55:15 PM UTC, comment #2:

Erm, https://savannah.gnu.org/bugs/?40334

Stefan Mahr <dac922>
Mon 21 Oct 2013 08:43:18 PM UTC, comment #1:

This bug seems somehow related to this bug https://savannah.gnu.org/bugs/?40333

If using print with setting font size (that returns with an error), the position of the axis changes like with gnuplot.

Stefan Mahr <dac922>
Mon 21 Oct 2013 07:10:28 PM UTC, original submission:

If plot and print are executed within a loop without closing the figure each time, the axes get smaller and smaller.

Stefan Mahr <dac922>


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

Attach File(s):

Attached Files
file #29461:  print_test-inc.eps added by ttl (5kB - image/x-eps)
file #29462:  print_test.eps added by ttl (5kB - image/x-eps)
file #29456:  print_test.png added by dac922 (9kB - image/png)
file #29457:  print_test.eps added by dac922 (23kB - image/x-eps)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by dac922 (Submitted the item)

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

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 26 Feb 2016 09:44:15 PM UTCrik5CategoryPlotting with gnuplot=>Plotting
      Summaryprint with legend modifies axis position (gnuplot)=>print with legend modifies axis position
    Thu 24 Oct 2013 05:09:15 PM UTCttlAttached File-=>Added print_test-inc.eps, #29461
      Attached File-=>Added print_test.eps, #29462
    Thu 24 Oct 2013 03:44:27 PM UTCrik5CategoryPlotting=>Plotting with gnuplot
      Summaryprint with legend modifies axis position=>print with legend modifies axis position (gnuplot)
    Thu 24 Oct 2013 11:04:57 AM UTCdac922Attached File-=>Added print_test.png, #29456
      Attached File-=>Added print_test.eps, #29457
    Thu 24 Oct 2013 12:17:32 AM UTCrik5StatusNone=>Fixed
    Tue 22 Oct 2013 03:18:54 PM UTCandy1978CategoryPlotting with gnuplot=>Plotting
      Item GroupNone=>Regression

    Back to the top

    Powered by Savane 3.1-cleanup