|
From: Yang Z. <yan...@gm...> - 2008-04-05 03:53:23
|
When I do "set size [<1 ratio]", for many terminals, there remains a space surrounding the figure because the canvas itself is not resized. I've seen this in pdf and emf; it does not happen with postscript eps. These are the only three terms I've tried. For pdf, I can use pdfcrop, but it won't be cropped the same for all plots, and this doesn't work for emf. Does anybody know of a way to just have gnuplot produce the "right" output (cropping/resizing the "canvas")? Thanks! -- Yang Zhang http://www.mit.edu/~y_z/ |
|
From: Tatsuro M. <tma...@ya...> - 2008-04-05 08:48:16
|
Hello
I cannot understand what is RIGHT.
However the relation between plot size and canvas size seemed to be complicated for gnuplot.
I refer 'help canvas' of gnuplot 4.3 (cvs)
************
In earlier versions of gnuplot, some terminal types used the values from set size to control also the
size of the output canvas; others did not. The use of 'set size' for this purpose was deprecated in
version 4.2. In version 4.3 almost all terminals now behave as follows:
set term <terminal_type> size <XX>, <YY> controls the size of the output file, or "canvas". Please see
individual terminal documentation for allowed values of the size parameters. By default, the plot
will fill this canvas.
set size <XX>, <YY> scales the plot itself relative to the size of the canvas. Scale values less than
1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a
portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may
cause problems on some terminal types.
The major exception to this convention is the PostScript driver, which by default continues to act as
it has in earlier versions. Be warned that the next version of gnuplot may change the default
behaviour of the PostScript driver as well.
Example:
set size 0.5, 0.5
set term png size 600, 400
set output "figure.png"
plot "data" using lines
These commands will produce an output file "figure.png" that is 600 pixels wide and 400 pixels tall.
The plot will fill the lower left quarter of this canvas. This is consistent with the way multiplot
mode has always worked, however it is a change in the way the png driver worked for single plots in
version 4.0. In earlier versions of gnuplot, some terminal types used the values from set size to
control also the size of the output canvas; others did not. The use of 'set size' for this purpose was
deprecated in version 4.2. In version 4.3 almost all terminals now behave as follows:
set term <terminal_type> size <XX>, <YY> controls the size of the output file, or "canvas". Please see
individual terminal documentation for allowed values of the size parameters. By default, the plot
will fill this canvas.
set size <XX>, <YY> scales the plot itself relative to the size of the canvas. Scale values less than
1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a
portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may
cause problems on some terminal types.
The major exception to this convention is the PostScript driver, which by default continues to act as
it has in earlier versions. Be warned that the next version of gnuplot may change the default
behaviour of the PostScript driver as well.
Example:
set size 0.5, 0.5
set term png size 600, 400
set output "figure.png"
plot "data" using lines
These commands will produce an output file "figure.png" that is 600 pixels wide and 400 pixels tall.
The plot will fill the lower left quarter of this canvas. This is consistent with the way multiplot
mode has always worked, however it is a change in the way the png driver worked for single plots in
version 4.0.
*******************************************************
Automatically resizing of of eps terminal may perhaps rely on the ability
automatically surrounding box abibility of the eps terminal.
For other terminal, the reult that cavas size does not change for according to 'set size' is RIGHT
behavior. If you want change the size of ascept ratio of the canvas, please control it by
set term (term name) size 600, 400
Regards
Tatsuro
--- Yang Zhang <yan...@gm...> wrote:
> When I do "set size [<1 ratio]", for many terminals, there remains a
> space surrounding the figure because the canvas itself is not resized.
> I've seen this in pdf and emf; it does not happen with postscript eps.
> These are the only three terms I've tried.
>
> For pdf, I can use pdfcrop, but it won't be cropped the same for all
> plots, and this doesn't work for emf. Does anybody know of a way to
> just have gnuplot produce the "right" output (cropping/resizing the
> "canvas")?
>
> Thanks!
>
> --
> Yang Zhang
> http://www.mit.edu/~y_z/
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> Monday, April 7! Use priority code J8TLD2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
--------------------------------------
GANBARE! NIPPON! Win your ticket to Olympic Games 2008.
http://pr.mail.yahoo.co.jp/ganbare-nippon/
|
|
From: Yang Z. <yan...@gm...> - 2008-04-07 17:39:58
|
Thanks, `set term ... size SIZE` is exactly what I was looking for. Tatsuro MATSUOKA wrote: > Hello > > > I cannot understand what is RIGHT. > However the relation between plot size and canvas size seemed to be complicated for gnuplot. > > I refer 'help canvas' of gnuplot 4.3 (cvs) > > ************ > In earlier versions of gnuplot, some terminal types used the values from set size to control also the > size of the output canvas; others did not. The use of 'set size' for this purpose was deprecated in > version 4.2. In version 4.3 almost all terminals now behave as follows: > > set term <terminal_type> size <XX>, <YY> controls the size of the output file, or "canvas". Please see > individual terminal documentation for allowed values of the size parameters. By default, the plot > will fill this canvas. > > set size <XX>, <YY> scales the plot itself relative to the size of the canvas. Scale values less than > 1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a > portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may > cause problems on some terminal types. > > The major exception to this convention is the PostScript driver, which by default continues to act as > it has in earlier versions. Be warned that the next version of gnuplot may change the default > behaviour of the PostScript driver as well. > > Example: > > set size 0.5, 0.5 > set term png size 600, 400 > set output "figure.png" > plot "data" using lines > > These commands will produce an output file "figure.png" that is 600 pixels wide and 400 pixels tall. > The plot will fill the lower left quarter of this canvas. This is consistent with the way multiplot > mode has always worked, however it is a change in the way the png driver worked for single plots in > version 4.0. In earlier versions of gnuplot, some terminal types used the values from set size to > control also the size of the output canvas; others did not. The use of 'set size' for this purpose was > deprecated in version 4.2. In version 4.3 almost all terminals now behave as follows: > > set term <terminal_type> size <XX>, <YY> controls the size of the output file, or "canvas". Please see > individual terminal documentation for allowed values of the size parameters. By default, the plot > will fill this canvas. > > set size <XX>, <YY> scales the plot itself relative to the size of the canvas. Scale values less than > 1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a > portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may > cause problems on some terminal types. > > The major exception to this convention is the PostScript driver, which by default continues to act as > it has in earlier versions. Be warned that the next version of gnuplot may change the default > behaviour of the PostScript driver as well. > > Example: > > set size 0.5, 0.5 > set term png size 600, 400 > set output "figure.png" > plot "data" using lines > > These commands will produce an output file "figure.png" that is 600 pixels wide and 400 pixels tall. > The plot will fill the lower left quarter of this canvas. This is consistent with the way multiplot > mode has always worked, however it is a change in the way the png driver worked for single plots in > version 4.0. > > ******************************************************* > > Automatically resizing of of eps terminal may perhaps rely on the ability > automatically surrounding box abibility of the eps terminal. > > For other terminal, the reult that cavas size does not change for according to 'set size' is RIGHT > behavior. If you want change the size of ascept ratio of the canvas, please control it by > > set term (term name) size 600, 400 > > > > Regards > > Tatsuro > > > > --- Yang Zhang <yan...@gm...> wrote: > >> When I do "set size [<1 ratio]", for many terminals, there remains a >> space surrounding the figure because the canvas itself is not resized. >> I've seen this in pdf and emf; it does not happen with postscript eps. >> These are the only three terms I've tried. >> >> For pdf, I can use pdfcrop, but it won't be cropped the same for all >> plots, and this doesn't work for emf. Does anybody know of a way to >> just have gnuplot produce the "right" output (cropping/resizing the >> "canvas")? >> >> Thanks! >> >> -- >> Yang Zhang >> http://www.mit.edu/~y_z/ >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Register now and save $200. Hurry, offer ends at 11:59 p.m., >> Monday, April 7! Use priority code J8TLD2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ >> Gnuplot-info mailing list >> Gnu...@li... >> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> > > > -------------------------------------- > GANBARE! NIPPON! Win your ticket to Olympic Games 2008. > http://pr.mail.yahoo.co.jp/ganbare-nippon/ |
|
From: Dieter J. <die...@t-...> - 2008-04-05 18:36:41
|
Hi Yang,
to my experience there is no way to achieve the "right" size of the plot (i.
e. nothing but the size of the appropriate bounding box) in the postscript
output.
I cannot tell about emf as I hardly use it. For pdf, the method of choice is
either pdfcrop, or epstopdf what is simpler IMHO.
As the size of the fonts and the amount of text impacts the total size of your
graph (given you have tics that reside outside) it is close to impossible to
keep the size of the entire picture exactly identical (if you modify labels /
tics).
I have to admit that I did not test so far whether the frame of the graph is
scaled and hence the outer bounds may vary or whether the total size of the
graph including the tics and the ticmarcs is scaled when resizing.
Take care - hope this clarifies somehow
Dieter
--
-----------------------------------------------------------
|
\
/\_/\ |
| ~x~ |/-----\ /
\ /- \_/
^^__ _ / _ ____ /
<°°__ \- \_/ | |/ | |
|| || _| _| _| _|
if you really want to see the pictures above - use some font
with constant spacing like courier! :-)
-----------------------------------------------------------Am Samstag, 5.
April 2008 05:56:05 schrieb Yang Zhang:
> When I do "set size [<1 ratio]", for many terminals, there remains a
> space surrounding the figure because the canvas itself is not resized.
*****
|