octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60236] figure is cropped without warning when


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #60236] figure is cropped without warning when printing a large figure to pdf or ps
Date: Mon, 15 Mar 2021 06:58:10 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36 Edg/89.0.774.50

URL:
  <https://savannah.gnu.org/bugs/?60236>

                 Summary: figure is cropped without warning when printing a
large figure to pdf or ps
                 Project: GNU Octave
            Submitted by: mmuetzel
            Submitted on: Mon 15 Mar 2021 11:58:08 AM CET
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: Confirmed
             Assigned to: None
         Originator Name: rik5
        Originator Email: 
             Open/Closed: Open
                 Release: 6.2.0
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

As noticed in bug #33118, the axes in the resulting file can exceed the page
size if a very large figure is printed to a .pdf or .ps file.

Steps to reproduce:

hf = figure(1);
plot([0,1]);
% resize the figure on screen
print(hf, '-dpdf', 'test_crop.pdf');


Like Rik wrote in the other report: This used to work differently in Octave
5.2, but changed in Octave 6.2.

Pantxo wrote:
> @Rik: The issue you noticed only happens with -dpdf (and -dps) paged
devices: the problem is that the page is too small for the figure to fit in.
In Octave 6, we switched to having the "paperpositionmode" property "auto" by
default hence the difference with Octave 5.2: if the onscreen figure is larger
than the "papersize", part of the figure are drawn outside the page. What does
matlab do in this case? At least a warning would not hurt.

In Matlab R2020b, I see the following warning in this case:

>> print(hf, '-dpdf', 'test_crop_matlab.pdf');
Warning: The figure is too large for the page and will be cut off. Resize the
figure, adjust the output size by setting the figure's PaperPosition property,
use the 'print' command with either the  '-bestfit' or '-fillpage' options, or
use the 'Best fit' or 'Fill page' options on the 'Print
Preview' window. 
> In validate (line 146)
In print (line 67) 


Maybe, we should emit a similar warning in this case.

CC'ing Rik and Pantxo.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60236>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]