如何为PM3D图设置X2LABEL?
我想在 x-x2 和 y-y2 轴上绘制具有不同比例的 pm3d 图(即“光学厚度”和“实际厚度”)。我可以使轴上的抽动不同,但 x2label
和 y2label
不会显示。您能推荐一个解决方案吗?
n1 = 1.2
n2 = 1.3
set view map
set link x2 via x*670/2/pi/n1 inverse 2*pi/670*n1*x
set link y2 via y*670/2/pi/n2 inverse 2*pi/670*n2*y
set xlabel "{/Symbol a}=2{/Symbol p}/{/Symbol l}n_1L"
set x2label "L_1(n_1) [nm]"
set ylabel "{/Symbol b}=2{/Symbol p}/{/Symbol l}n_2L"
set y2label "L_2(n_2) [nm]"
set xtics nomirror
set ytics nomirror
set x2tics 100
set y2tics 100
unset colorbox
splot sin(x)*y**2 w pm3d
我有一个手动解决方案,类似于:
set label 1 at screen 0.95, screen 0.5 "L_2(n_2) [nm]" rotate by 90
但这不是我认为的最好方法。
I want to make a pm3d
plot with different scales on the x-x2 and y-y2 axes
(namely 'optical thickness' and 'real thickness'). I can make the tics different on the axes, but the x2label
and y2label
are not shown. Could you recommend a solution?
n1 = 1.2
n2 = 1.3
set view map
set link x2 via x*670/2/pi/n1 inverse 2*pi/670*n1*x
set link y2 via y*670/2/pi/n2 inverse 2*pi/670*n2*y
set xlabel "{/Symbol a}=2{/Symbol p}/{/Symbol l}n_1L"
set x2label "L_1(n_1) [nm]"
set ylabel "{/Symbol b}=2{/Symbol p}/{/Symbol l}n_2L"
set y2label "L_2(n_2) [nm]"
set xtics nomirror
set ytics nomirror
set x2tics 100
set y2tics 100
unset colorbox
splot sin(x)*y**2 w pm3d
I have a manual solution with something like:
set label 1 at screen 0.95, screen 0.5 "L_2(n_2) [nm]" rotate by 90
but it is not the best way I think.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能可以使用
plot w image
,而不是使用splot w pm3d
。立即,我在 gnuplot help 中找不到任何有用的信息,为什么“3D”图中没有 x2label。也许有,只是我还没有找到。
脚本:
结果:
Instead of using
splot w pm3d
you probably could useplot w image
.Right away, I couldn't find any useful information in gnuplot help why there is no x2label in a "3D"-plot. Maybe there is and I just haven't found it.
Script:
Result:
事实证明,这是版本5.2中的错误。它将在版本5.4.4中固定。
a href =“ https://sourceforge.net/p/gnuplot/bugs/2519/”
< a href =“ https://sourceforge.net/p/gnuplot/bugs/2484/”
It was turn out, that is a bug in version 5.2. It will be fixed in release 5.4.4.
https://sourceforge.net/p/gnuplot/bugs/2519/
https://sourceforge.net/p/gnuplot/bugs/2484/