here, pos reads [10, 23, 400, 320] and the eps file has a bounding box set as
%%BoundingBox: 0 0 400 300
I noticed, that the displayed figure has a status line at the bottom where the position of the mouse cusor is displayed.
This status line is of course not printed to eps, so I wondered if the status line is included in the figure's height property - this would explain why the eps figure seems to have been shrinked ?
using octplot 0.3.9 under cygwin
regards
ben
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for clarification,
So when the target is a desired print size XxY, 20 pixel must be added when setting the Figure position before printing.
This is not a big deal - just one needs to know it.
the competition has a property "PaperPosition" defining the printing size on paper respectively the export size along with the "Position" Property defining the placement on screen.
From the Manual:
PaperPosition four-element rect vector
Location on printed page. A rectangle that determines the location of the figure
on the printed page. Specify this rectangle with a vector of the form
rect = [left, bottom, width, height]
where left specifies the distance from the left side of the paper to the left side
of the rectangle and bottom specifies the distance from the bottom of the page to the
bottom of the rectangle. Together these distances define the lower-left corner of the
rectangle. width and height define the dimensions of the rectangle. The PaperUnits
property specifies the units used to define this rectangle.
They also have a "PaperUnits" property (meaning the PaperPosition is defined in units of PaperUnits, which can be either "inch" or "centimeter" IIRC), a "PaperOrientation", a "PaperSize" and a "PaperType" Property.
In principle this is practical if you get used to it - but not essential.
If one of these will make it into octplot, i would vote for the "PaperPosition". The rest is more connected to windows GUI printing stuff
If there is a fair chance to implement a "PaperPosition" Property, I can post it as a feature request
ben
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not sure if this is a bug or by design, but it confused me:
When printing a figure to eps file, the bounding box of the eps file has a height reduced by 20 compared to the figure's position
clf;
plot( 0:0.1:10, sin(0:0.1:10), 'b-');
pos = get(gcf,'Position');
print("/tmp/testing.eps","-depsc2");
here, pos reads [10, 23, 400, 320] and the eps file has a bounding box set as
%%BoundingBox: 0 0 400 300
I noticed, that the displayed figure has a status line at the bottom where the position of the mouse cusor is displayed.
This status line is of course not printed to eps, so I wondered if the status line is included in the figure's height property - this would explain why the eps figure seems to have been shrinked ?
using octplot 0.3.9 under cygwin
regards
ben
You are right -- the 20 pixels are the status bar.
This way, the figure position gives the right window size, but the wrong paper size.
What does the competition do?
Shai
Thanks for clarification,
So when the target is a desired print size XxY, 20 pixel must be added when setting the Figure position before printing.
This is not a big deal - just one needs to know it.
the competition has a property "PaperPosition" defining the printing size on paper respectively the export size along with the "Position" Property defining the placement on screen.
From the Manual:
PaperPosition four-element rect vector
Location on printed page. A rectangle that determines the location of the figure
on the printed page. Specify this rectangle with a vector of the form
rect = [left, bottom, width, height]
where left specifies the distance from the left side of the paper to the left side
of the rectangle and bottom specifies the distance from the bottom of the page to the
bottom of the rectangle. Together these distances define the lower-left corner of the
rectangle. width and height define the dimensions of the rectangle. The PaperUnits
property specifies the units used to define this rectangle.
They also have a "PaperUnits" property (meaning the PaperPosition is defined in units of PaperUnits, which can be either "inch" or "centimeter" IIRC), a "PaperOrientation", a "PaperSize" and a "PaperType" Property.
In principle this is practical if you get used to it - but not essential.
If one of these will make it into octplot, i would vote for the "PaperPosition". The rest is more connected to windows GUI printing stuff
If there is a fair chance to implement a "PaperPosition" Property, I can post it as a feature request
ben
Please do post it as a feature request. This way I can track it, and before each release I can go over the list and see if ti can be implemented.
Shai