bugGNU Octave - Bugs: bug #59351, Figure property paperunits without...

 
 

bug #59351: Figure property paperunits without option pixels

Submitter:  Miloš Petrašinović <mpetrasinovic>
Submitted:  Mon 26 Oct 2020 02:25:18 PM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Miloš Petrašinović Open/Closed:  * Closed
Release:  * 6.0.92 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 28 Oct 2020 04:40:14 PM UTC, comment #5: 

I pushed the change here:
https://hg.savannah.gnu.org/hgweb/octave/rev/6075738dc529

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Wed 28 Oct 2020 04:10:33 PM UTC, comment #4: 

Thank you, I think that this is enough.

Miloš Petrašinović <mpetrasinovic>
Wed 28 Oct 2020 03:56:15 PM UTC, comment #3: 

The attached patch changes the documentation for the figure property "paperunits". I hope I got this right.

(file #50155)

Markus Mützel <mmuetzel>
Group administrator
Mon 26 Oct 2020 04:34:08 PM UTC, comment #2: 

Thank you for your quick response. I will open a separate report, I just thought these are somehow connected.

Miloš Petrašinović <mpetrasinovic>
Mon 26 Oct 2020 04:18:55 PM UTC, comment #1: 

Please, report only one issue per bug report.

I can confirm that there is an issue with the documentation: The figure property "paperunits" cannot be set to "pixels". And afaics, it never could.
The documentation should be updated. I's probably ok to just remove that sentence.

Please, open separate reports for the remaining issue(s) you see.

Markus Mützel <mmuetzel>
Group administrator
Mon 26 Oct 2020 02:25:18 PM UTC, original submission:  

In the documentation for figure properties, you can find the following:

For paperunits set to "pixels", the conversion between physical units (ex: "inches") and "pixels" is dependent on the screenpixelsperinch property of the root object.

But this option ("pixels") those not exist for paperunits.

After running the following script for fig1.svg I get 494x370 pt and for fig2.svg I get 560x420 pt while for fig1.png I get 1029x772 px and for fig2.png I get 560x420px. I can see that there is a difference in displayed font size and in saved
images, also in fig2.svg font size is not 18pt. Are those expected results?


pos = [300 200 560 420];
figure(1,'paperunits','points','papersize',pos(3:4))
plot([0,1],[0,1]);
set(gca,'fontunits','points','fontsize',18,'FontName','Arial');
print('fig1.svg','-dsvg');
print('fig1.png','-dpng');
print('fig2.svg','-dsvg',['-S' num2str(pos(3)) ',' num2str(pos(4))],'-F:18');
print('fig2.png','-dpng',['-S' num2str(pos(3)) ',' num2str(pos(4))],'-F:18');

get(get(f,'Parent'),'screenpixelsperinch') % ans = 81.597


Miloš Petrašinović <mpetrasinovic>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #50155:  bug59351_doc_paperunits.patch added by mmuetzel (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-28 mmuetzel StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2020-10-28 mmuetzel Attached File- Added bug59351_doc_paperunits.patch, #50155
        StatusConfirmed Patch Submitted
    2020-10-26 mmuetzel CategoryPlotting Documentation
        StatusNone Confirmed
        Operating SystemMicrosoft Windows Any
    2020-10-26 mpetrasinovic Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code