1

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. enter image description here

The plot is created by this script in the terminal :

set palette grey
plot 'color_map.dat' matrix with image
2
  • Have you tried taking the transpose of the matrix before plotting it? As for axis scaling, look at the documentation: gnuplot.sourceforge.net/docs_4.2/node294.html Commented Sep 4, 2015 at 17:06
  • Problem solved? Question answered? Commented Dec 14, 2023 at 13:36

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.