gpt4 book ai didi

ubuntu - 无法在 "label"和 "key"之间使用不同的字体大小

转载 作者:行者123 更新时间:2023-12-04 18:46:53 32 4
gpt4 key购买 nike

我有两个疑问。

1) 我正在尝试为 label 设置不同的字体大小和 key .奇怪的是无法为下面的 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

输出文件:
enter image description here

最佳答案

设置后font对于xlabelylabel您使用以下调用覆盖它两次,其中包含类似 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"
enter image description here
关于第 2 点):gnuplot 没有 z2 轴(在 3D 中也没有 x2 和 y2 轴),并且您无法选择 z 轴的位置。

关于ubuntu - 无法在 "label"和 "key"之间使用不同的字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32205482/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com