相对于x2轴在x1中绘制y1 [英] Plot y1 in x1 with respect to x2 axis

查看:56
本文介绍了相对于x2轴在x1中绘制y1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据如下:

y1   x1   x2
125  100   1
130  90    2
136  85    3
143  70    4
145  65    5

我希望将其绘制在gnuplot中,如图所示.

I would like to plot it in gnuplot as in the figure.

我使用了此处提到的步骤 Gnuplot:绘制x2轴相对于x1轴,但它以不同的方式绘制x2.

I used the procedure mentioned here Gnuplot: Plot x2 axis with respect to x1 axis , but it is plotting the x2 differently.

推荐答案

照常在x1和y1轴上绘制数据,但使用x2tic(3)在x2轴上放置其他标签:

Plot your data as usual on the x1 and y1 axes, but place additional labels on the x2-axis with x2tic(3):

set xrange [*:*] reverse
set x2tics
set xtics nomirror
plot 'file.dat' using 2:1:x2tic(3) with linespoints pt 7 notitle

如果您不希望使用常规数字,也可以同时使用x2ticxtic:

If you don't want a conventional numerical, you could also use both x2tic and xtic:

plot 'file.dat' using 2:1:x2tic(3):xtic(2) with linespoints pt 7 notitle

这篇关于相对于x2轴在x1中绘制y1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆