无法在 "label" 和 "key" 之间设置不同的字体大小

Unable to have different font size between "label" and "key"

我有两个问题。

1) 我正在尝试为 labelkey 使用不同的字体大小。奇怪的是,下面的 MWE 无法这样做,尽管从那里的手册来看语法似乎是正确的。

有没有明显的错误?

2) 如何让 Z 轴在最右边的 z 列中也用其 ztics 标记。我没有成功使用 z2tics 完成它。

Gnuplot 版本(Ubuntu 10.04):

G N U P L O T
Version 4.4 patchlevel 0
last modified March 2010
System: Linux 2.6.32-73-generic

Copyright (C) 1986-1993, 1998, 2004, 2007-2010
Thomas Williams, Colin Kelley and many others

MWE:

#!/usr/local/bin/gnuplot
reset

set term postscript eps enhanced font "Helvetica"10 
set output "output.eps"
set autoscale
set grid nopolar
set grid xtics nomxtics ytics nomytics noztics nomztics nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics
set grid layerdefault lt 1 lc rgb "black" linewidth 0.200 ,  lt 2 lc rgb "black" linewidth 0.200
set style data lines

set xlabel "X-Axis" font 'Helvetica,25'
set xlabel  offset character 3, -2, 0 font "" textcolor lt -1 rotate by -270
set xlabel  font "" textcolor lt -1 norotate
set xrange [ 1 : 4 ] noreverse nowriteback
set xtics 1 

set ylabel "Y-Axis" font 'Helvetica,25'
set ylabel  offset character -3, -2, 0 font "" textcolor lt -1 norotate
set ylabel font "" textcolor lt -1 norotate
set yrange [ 1 : 4 ] noreverse nowriteback
set ytics 1 

set zlabel "Z-Axis" font 'Helvetica,25'
set zlabel  offset character 2, 0, 0 font "" textcolor lt -1 norotate
set zlabel font "" textcolor lt -1 rotate by 90
set zrange [ 0 : 16 ] noreverse nowriteback

set key top left horizontal box spacing 1.75 at 2.5,5,18
set dgrid3d 4,4 splines

splot \
"data.dat" using 2:1:3 ti "Surface 1" with lines lc rgb "red" ,\
"data.dat" using 2:1:4 ti "Surface 2" with lines lc rgb "blue" 

数据文件(data.dat):

Column 1    Column 2    Column 3    Column 4
1   1   4.869679347 3.972865464                         
1   2   5.525583065 4.021323159
1   3   5.301208942 4.030586248                                 
1   4   5.196368577 4.013930969
2   1   8.431558641 5.219640683
2   2   8.541050259 4.604480742
2   3   8.959566461 4.473923458
2   4   8.553504132 4.286745078
3   1   11.12925205 7.254675355
3   2   11.59059432 7.374715619
3   3   10.67896866 7.058545226
3   4   11.09279485 6.728441639
4   1   15.57308092 10.92185317
4   2   15.26268993 10.59114975
4   3   14.88192486 10.1134937
4   4   14.74660555 10.15774687

输出文件:

在为 xlabelylabel 设置 font 后,您可以使用以下调用覆盖它两次,其中包含类似 set xlabel font "" 的内容。合并那些主要是多余的调用:

#!/usr/local/bin/gnuplot
reset

set term postscript eps enhanced font "Helvetica,10" color
set output "output.eps"

set xlabel "X-Axis" font 'Helvetica,25' offset character 3, -2, 0
set xrange [ 1 : 4 ]
set xtics 1 

set ylabel "Y-Axis" font 'Helvetica,25' offset character -3, -2, 0
set yrange [ 1 : 4 ]
set ytics 1 

set zlabel "Z-Axis" font 'Helvetica,25' offset character 2, 0, 0
set zrange [ 0 : 16 ]

set key top left horizontal box spacing 1.75 at 2.5,5,18
set dgrid3d 4,4 splines

splot \
"data.dat" using 2:1:3 ti "Surface 1" with lines lc rgb "red" ,\
"data.dat" using 2:1:4 ti "Surface 2" with lines lc rgb "blue" 

关于第 2 点:gnuplot 没有 z2 轴(它在 3D 中也没有 x2 和 y2 轴),你不能 select zaxis 的位置。