[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #34198] changing figure units produces erratic
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #34198] changing figure units produces erratic behavior |
Date: |
Fri, 02 Sep 2011 16:05:54 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1 |
URL:
<http://savannah.gnu.org/bugs/?34198>
Summary: changing figure units produces erratic behavior
Project: GNU Octave
Submitted by: bpabbott
Submitted on: Fri 02 Sep 2011 12:05:53 PM EDT
Category: Plotting with OpenGL
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Ben Abbott
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Mac OS
_______________________________________________________
Details:
Changing a figure's units produced erratic behavior on MacOS when using the
FLTK backend. I assume the same behavior will occur for Linux? / Windows?
Gnuplot works as expected.
Running the script below ...
units = {"centimeters", "inches", "pixels", "points"};
graphics_toolkit gnuplot
close all
for u = 1:numel(units)
figure (u, "units", units{u}, "name", units{u})
surf (peaks)
p = get (gcf, "position");
fprintf ("position = [%f, %f, %f, %f] %s\n", p, units{u})
endfor
... produces the text ...
position = [11.151864, 7.087403, 14.225612, 10.669209] centimeters
position = [4.390497, 2.790316, 5.600635, 4.200476] inches
position = [440.000000, 280.000000, 560.000000, 420.000000] pixels
position = [316.115819, 200.902764, 403.245692, 302.434269] points
These results are correct (my "screenpixelsperinch" is 99.989)
However, when the units are centimeters or inches the figure is *not* visible.
The figure, with units = points is visible, but has changed position and size
(I've attached a png for both units = pixels and points).
The size of the figure when the units are set to points is 517 × 478.
When the units are pixels the size is 674 × 596.
My screensize is reported to be [1 1 1680 1028]. The actual size is
1680x1050. The minor difference is due to the menu bar of MacOS.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 02 Sep 2011 12:05:53 PM EDT Name: pixels.png Size: 74kB By:
bpabbott
figure with units = pixels & points on MacOS 10.7
<http://savannah.gnu.org/bugs/download.php?file_id=23930>
-------------------------------------------------------
Date: Fri 02 Sep 2011 12:05:53 PM EDT Name: points.png Size: 61kB By:
bpabbott
figure with units = pixels & points on MacOS 10.7
<http://savannah.gnu.org/bugs/download.php?file_id=23931>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34198>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #34198] changing figure units produces erratic behavior,
Ben Abbott <=