|
From: Harald H. <h.h...@tu...> - 2005-11-12 23:27:12
|
On Sat, 12 Nov 2005, Daniel J Sebald wrote:
> > Oh no, not again. For all postscript terminals, it's the only way to
> > produce large plots. And for some other terminals, it also works as scale
> > factor for the canvas. If you are allowed to reduce the canvas size using
> > 'set size 0.7,0.7' you also have to be allowed to increase it by using
> > 'set size 2.0,2.0'. And to maintain compatibility (to the old code where
> > no clipping was done in most terminals) we will have to handle sizes above
> > 1, too.
>
> I'm sort of in agreement with you, Harald. [My pipe dream has always
> been to find the time to write a document "How to layout plots in
> gnuplot".] But I would say I think there are two distinct concepts here,
> one the size of the plot with respect to the convas and another the size
> of the canvas with respect to the plotting device's inherent coordinate
> system.
Right. I agree. And I think we should have both. At the moment, screen is
a mixture of both, depending on the terminal:
postscript:
- screen coordinate system has fixed size
- screen coordinates of upper right corner of canvas is changing according
to 'set size'
png:
- screen coordinate system - scales with given size in 'set terminal'
- screen coordinates of upper right corner of canvas is changing according
to 'set size', and image size scales with 'set size', too.
fig:
- acts as png
x11:
- screen coordinate system scales with window
- upper right corner always has screen 1,1.
> For example, with PostScript, if I were to make the _canvas_ size
> 2.0,2.0 without changing plot size, what I'd expect is font size, line
> thickness, etc. to "shrink" in a relativistic way.
You mean, the fonts shall stay the same size, but glyph height is only 5%
of the canvas height instead of 10%? This is the case, also for line
thickness etc.
> Similarly, if I set
> _plot_ size 0.5,0.5 without changing canvas size I'd expect font size,
> line thickness, etc. to "expand" in a relativistic way.
That's the case.
> Mantra?
???
> Clip to the canvas, not the plot?
Depends on what you are doing. Parts of the plot, e.g. lines, vectors etc.
should clip to the plot. But free given labels and arrows should be
clipped to the canvas because it can be useful to place things outside the
plot.
> Should "subplots" have a canvas size too?
> Am I confusing matters worse than already are?
Yes, you are.
Let me conclude what I think now:
1.) The screen coordinate system should not be changed anymore (with the
exception that the clipping has to be fixed to the current 'set size'
to canvas size relationship in all terminals.
2.) Some new coordinate systems should be introduced:
- A canvas coordinate system that always runs from 0 to 1 on the canvas
- A subcanvas coordinate system that always runs from 0 to 1 on the
"single-multiplot-plot canvas"
- One or more coordinate systems with absolute sizes, e.g., mm,
inch=25.4mm, pt=1/72inch, pixel=(res in dpi)*inch.
3.) A resolution should be introduced which can be forwarded to the pixel
terminals for the output files and be used by the other terminals to
be able to calculate between pixel and the other absolute measures.
4.) The screen coordinate should be marked as 'deprecated'.
5.) 'set size' and 'set origin' before 'set terminal' should print a
warning because they have strange behaviour.
6.) 'set size' and 'set origin' after 'set terminal' should only affect
the plot, not the canvas. Sizes above 1 should be still allowed in
case somebody likes to have a half plot on the screen.
7.) 'set size', 'set origin' and the size measures for the terminals
should understand 'screen' coordinates (which size and origin do
exclusively, now) and all absolute coordinate systems (mm, inch, pt,
pixel, character). Not that character is the only absolute coordinate
system we have at the moment. Its measure only depends on the chosen
fontsize.
This approach has a couple of advantages:
- Compatibility to old scripts is maintained
- In future, we have a much clearer interface and it is possible to say "I
want a plot of 5 x 3 inches" (and this for all terminals). What to do
with the screen terminals is somehow unclear. But using the X server
solution (which should be accessable), even mm, inch, pt should be
possible.
What do you all think about this approach?
Best regards
Harald
--
Harald Harders
h.h...@tu...
http://www.harald-harders.de
|