在gnuplot中旋转图 [英] Rotating a plot in gnuplot

查看:95
本文介绍了在gnuplot中旋转图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1-如何旋转图,使y成为新的x轴,反之亦然?

1-How can I rotate my plot so y would be the new x axis and vice versa?

2-将y轴的最大值从60更改为100.

2- Change the maximum value of y axis from 60 to 100.

该图是通过此脚本在终端中创建的:

The plot is created by this script in the terminal :

set palette grey
plot 'color_map.dat' matrix with image

推荐答案

您可以使用using修饰符交换x和y轴. (就像普通图一样,除了矩阵数据外,第1列和第2列不在您的数据文件中,而是被推断出来的.)

You can exchange the x and y axes with the using modifier. (Just like for ordinary plots, except that for matrix data, columns 1 and 2 are not in your data file, but are inferred.)

plot 'color_map.dat' matrix using 2:1:3 with image

如果您实际上只想更改y(新x)轴上的最大值,则可以使用set xrange[:100].但这听起来好像您可能实际上是想扩展数据本身,在这种情况下,您可以使用

If you actually just want to change the maximum value on the y (new x) axis, you would use set xrange[:100]. But it sounds like you might actually want to scale the data itself, in which case you could use

plot 'color_map.dat' matrix using ($2/60.*100):1:3 with image

尝试使用help plot matrix了解更多详细信息.

Try help plot matrix for more details.

这篇关于在gnuplot中旋转图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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