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

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

[Octave-bug-tracker] [bug #46469] Changing papersize and paperposition l


From: anonymous
Subject: [Octave-bug-tracker] [bug #46469] Changing papersize and paperposition leads to cropped images while printing to PDF or PNG
Date: Wed, 18 Nov 2015 09:26:51 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0

URL:
  <http://savannah.gnu.org/bugs/?46469>

                 Summary: Changing papersize and paperposition leads to
cropped images while printing to PDF or PNG
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mi 18 Nov 2015 09:26:50 UTC
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Jens Potschadtke
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

This affects Octave 4.0.0 on Windows 7 64 bit installed as 32 bit Cygwin
package.

Printing the a plot with the default renderer and the following script leads
to two problems:
* cropped images
* broken pipe or similar errors when omitting the sleep between prints which
leads to image test02.pdf not being generated

When setting the graphics_toolkit to "fltk", the images are produced correctly
but with broken pipe for the print without sleep.

myPaperSize = [30, 10];
myBorder = [1, 1];
data = rand(50,1);

#graphics_toolkit ("fltk");
plot(data);
#set(gcf,"paperunits","inches");
set(gcf,"paperunits","centimeters");
#set(gcf,"paperpositionmode","manual");
#set(gcf,"paperorientation","landscape");
set(gcf,"papertype","<custom>");
set(gcf,"papersize",myPaperSize);
set(gcf,"paperposition",[myBorder, myPaperSize-myBorder]);


title ("Plot 01")
xlabel "Timestamp [samples]";
ylabel "Interval [ms]";
sleep(1);
print "test01.pdf" -dpdf
sleep(1);
print "test01.png" -dpng



clf;
plot(data);
title ("Plot 02 without sleep")
print "test02.pdf" -dpdf
print "test02.png" -dpng


The images have the correct aspect ratio and correct size (PDF), but the image
contains only about one quarter (upper left corner) of the plot.
I can see the plot window temporarely being resized to the correct aspect
ratio and I see the full plot inside the image. But during export as PNG (PDF
has the same problem) the image gets cropped and only about a quarter of the
image gets saved.

The execution of the script above in a file named plotsize.m produces the
following error on the prompt:

$ octave plotsize.m
warning: print.m: fig2dev binary is not available.
Some output formats are not available.
warning: called from
    __print_parse_opts__ at line 385 column 9
    print at line 288 column 8
    plotsize.m at line 21 column 1
warning: gl2ps-renderer::draw: empty feedback buffer and/or nothing else to
print
/bin/sh: /usr/bin/gs: Bad address
/bin/sh: /usr/bin/rm: Bad address




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mi 18 Nov 2015 09:26:50 UTC  Name: test01.pdf  Size: 3kB   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=35487>
-------------------------------------------------------
Date: Mi 18 Nov 2015 09:26:50 UTC  Name: test02.png  Size: 30kB   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=35488>
-------------------------------------------------------
Date: Mi 18 Nov 2015 09:26:50 UTC  Name: test01.png  Size: 29kB   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=35489>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46469>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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