- 论坛徽章:
- 0
|
图形输出到文件
set terminal postscript eps enhanced color solid
set output "file.eps"
其中第一条命令为设置终端模式,post即为postscript模式,这是输出到ps或eps文件必须有的。后面的eps,color,solid以及enh选项均可以有或没有,根据你的需要。eps表示输出为eps文件,没有就输出为ps文件;color表示输出图形为彩色,不用就会保存为黑白的;solid表示输出图中的所有线都用实线,不用则除了第一条线为实线外,其它的均用不同的虚线;使用enh(enhanced)选项可以在图中插入上下标、希腊字母和特殊符号,不用则不能实现这些功能。后面的选项可以根据自己的需要选择一个或几个。
http://blog.chinaunix.net/u2/65114/showart_1099446.html
---------------------------------------------
格式
The acceptable formats (if not in time/date mode) are:
Format Explanation
%f floating point notation
%e or %E exponential notation; an "e" or "E" before the power
%g or %G the shorter of %e (or %E) and %f
%x or %X hex
%o or %O octal
%t mantissa to base 10
%l mantissa to base of current logscale
%s mantissa to base of current logscale; scientific power
%T power to base 10
%L power to base of current logscale
%S scientific power
%c character replacement for scientific power
%P multiple of pi
A 'scientific' power is one such that the exponent is a multiple of three.
Character replacement of scientific powers (`"%c"`) has been implemented
for powers in the range -18 to +18. For numbers outside of this range the
format reverts to exponential.
Other acceptable modifiers (which come after the "%" but before the format
specifier) are "-", which left-justifies the number; "+", which forces all
numbers to be explicitly signed; "#", which places a decimal point after
floats that have only zeroes following the decimal point; a positive integer,
which defines the field width; "0" (the digit, not the letter) immediately
preceding the field width, which indicates that leading zeroes are to be used
instead of leading blanks; and a decimal point followed by a non-negative
integer, which defines the precision (the minimum number of digits of an
integer, or the number of digits following the decimal point of a float).
Some releases of 'printf' may not support all of these modifiers but may also
support others; in case of doubt, check the appropriate documentation and
then experiment.
Examples:
set format y "%t"; set ytics (5,10) # "5.0" and "1.0"
set format y "%s"; set ytics (500,1000) # "500" and "1.0"
set format y "+-12.3f"; set ytics(12345) # "+12345.000 "
set format y "%.2t*10^%+03T"; set ytic(12345)# "1.23*10^+04"
set format y "%s*10^{%S}"; set ytic(12345) # "12.345*10^{3}"
set format y "%s %cg"; set ytic(12345) # "12.345 kg"
set format y "%.0P pi"; set ytic(6.283185) # "2 pi"
set format y "%.0P%%"; set ytic(50) # "50%"
set log y 2; set format y '%l'; set ytics (1,2,3)
#displays "1.0", "1.0" and "1.5" (since 3 is 1.5 * 2^1)
There are some problem cases that arise when numbers like 9.999 are printed
with a format that requires both rounding and a power.
If the data type for the axis is time/date, the format string must contain
valid codes for the 'strftime' function (outside of `gnuplot`
(Note:
gnuplot
), type "man strftime"). See `set timefmt`
(Note:
timefmt
) for a list of the allowed input format codes.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4670/showart_1168031.html |
|