Rotating a plot in gnuplot

时光毁灭记忆、已成空白 提交于 2019-12-13 18:41:05

问题


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

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

回答1:


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

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

Try help plot matrix for more details.



来源:https://stackoverflow.com/questions/32402697/rotating-a-plot-in-gnuplot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!