bugGNU Octave - Bugs: bug #46435, rotated graphics output for device...

 
 

bug #46435: rotated graphics output for device pdfwrite

Submitted by:  Andreas Stahel <sha1>
Submitted on:  Fri 13 Nov 2015 03:38:36 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Andreas StahelOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 19 Nov 2015 04:22:52 PM UTC, comment #5:

I pushed a fix to the stable branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/234589c84d4a). This will be a part of the next 4.0.1 bug fix release.

Rik <rik5>
Project Administrator
Fri 13 Nov 2015 06:37:20 PM UTC, comment #4:

Ghostscript seems to use some majority function so that when "most" of the text is running in a certain direction it tries to orient the page in that direction.

I added the option that Mike suggested to the default options in _ghostscript_.m. See the attached diffs.txt. It seems to fix the issue but more testing, including regression testing, should be done.

(file #35449)

Rik <rik5>
Project Administrator
Fri 13 Nov 2015 05:43:30 PM UTC, comment #3:

Good catch. I think this is due to the "AutoRotatePages" feature of ghostscript. The default value invokes some magic algorithm to rotate each page. If I use ps2pdf, I get the rotated output. If I add "-dAutoRotatePages=/None", it's upright.

Mike Miller <mtmiller>
Project Administrator
Fri 13 Nov 2015 05:11:50 PM UTC, comment #2:

Confirmed as well with the gnuplot toolkit. This suggests that the problem is general, and possibly in print.m, rather than in the C++ code dealing with gl2ps.

Also, Octave creates just eps or ps files, and if necessary converts those to a different format such as pdf, png, jpg, etc. It appears that the intermediate ps file is correct, and that it might be the downstream tool which is introducing the bug.

For example,

Rik <rik5>
Project Administrator
Fri 13 Nov 2015 04:37:15 PM UTC, comment #1:

Confirmed. With gl2ps and pdf output, the figure is rotated on the page if the string length of the ylabel exceeds the length of the xlabel by 15 or more characters.

A couple of simpler examples:

Mike Miller <mtmiller>
Project Administrator
Fri 13 Nov 2015 03:38:36 PM UTC, original submission:

Dear developer with version 4.0.0 and the current development release the code below generates a rotated PDF file. Some other plots are treated correctly. Using the device epsc and then epstopdf also generates the correct result.

Andreas Stahel <sha1>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35449:  diffs.txt added by rik5 (641B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by sha1 (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 Nov 2015 04:22:52 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Fri 13 Nov 2015 06:37:20 PM UTCrik5Attached File-=>Added diffs.txt, #35449
      StatusConfirmed=>Patch Submitted
    Fri 13 Nov 2015 05:11:50 PM UTCrik5CategoryPlotting with OpenGL=>Plotting
    Fri 13 Nov 2015 04:37:15 PM UTCmtmillerCategoryPlotting=>Plotting with OpenGL
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1