bugGNU Octave - Bugs: bug #34152, set(gcf,'papersize','centimeters')...

 
 

bug #34152: set(gcf,'papersize','centimeters') uses milimeters

Submitter:  None
Submitted:  Sat 27 Aug 2011 11:28:56 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  bpabbott
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.4.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 02 Sep 2011 01:33:25 AM UTC, comment #4: 

I'm closing this item.

Ben Abbott <bpabbott>
Group Member
Mon 29 Aug 2011 01:25:31 AM UTC, comment #3: 

I've pushed a changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/ca08ddb1c06a

I'll leave this open until I have time to do some more testing.

Ben Abbott <bpabbott>
Group Member
Mon 29 Aug 2011 01:09:49 AM UTC, comment #2: 

I have a patch that fixes the problem for me.


diff --git a/scripts/plot/private/__print_parse_opts__.m b/scripts/plot/private/__print_parse_opts__.m
--- a/scripts/plot/private/__print_parse_opts__.m
+++ b/scripts/plot/private/__print_parse_opts__.m
@@ -570,7 +570,7 @@
     case "inches"
       value = value * 72;
     case "centimeters"
-      value = value * 72 / 25.4;
+      value = value * 72 / 2.54;
     case "normalized"
       error ("print:customnormalized",
              "print.m: papersize=='<custom>' and paperunits='normalized' may not be combined");


I'll prepare a changeset

Ben Abbott <bpabbott>
Group Member
Sun 28 Aug 2011 01:14:41 AM UTC, comment #1: 

This bug is present in the default branch.  The short example below implicates the print() function.


figure(1)
clf
plot(0)
get(1,'paperposition') * 2.54
set(1,'paperunits','centimeters')
get(1,'paperposition')




Ben Abbott <bpabbott>
Group Member
Sat 27 Aug 2011 11:28:56 AM UTC, original submission:  


plot(0)
set(1,'paperunits','centimeters')
get(1,'paperposition')
print -depsc2 test.eps
exec "gv" "test.eps"


The plot is much too small

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-09-02 bpabbott Open/ClosedOpen Closed
    2011-08-29 bpabbott Item GroupNone Incorrect Result
        StatusConfirmed Fixed
    2011-08-29 bpabbott Assigned toNone bpabbott
    2011-08-28 bpabbott StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code