LoginSignup
9

More than 5 years have passed since last update.

gnuplotでx軸とy軸のスケールを一致させたいとき

Last updated at Posted at 2016-02-07

gnuplotで、x軸方向とy軸方向のデータの単位が同じな時。

例えばxもyもmmで2次元上のプロットを見たいのに、gnuplotは親切にフィッティングしてくれちゃうので、縦に長いグラフとかは横に伸びてしまう。

ググるとset size ratio 1,1とかset size squareとかは出てくるけど、これはグラフの大きさをフィットしてくれるだけなので求めているものではない。

正しいやり方はこう。

set size ratio -1

参考: http://gnuplot.sourceforge.net/docs_4.2/node230.html

The meaning of a negative value for r is different. If r=-1, gnuplot tries to set the scales so that the unit has the same length on both the x and y axes (suitable for geographical data, for instance). If r=-2, the unit on y has twice the length of the unit on x, and so on.

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9