LoginSignup
2
1

More than 5 years have passed since last update.

Maximaで点をplotする

Last updated at Posted at 2015-04-24

plot2dを使ってdata.txtに書かれた値をplotする。

data.txt
0 0
1 2
2 4
3 6
4 8
5 10

こんな感じのdata.txtを用意する。左がx座標、右がy座標。

maximaを起動して

data: transpose(read_matrix("/path/to/data.txt"));
plot2d([discrete,data[1],data[2]],[style,points]);

これで、点がプロットされる。style,pointsを消せば、直線が表示される。
data[1],data[2]というのが、最初に取り込んだdata.txtの列を表しているので
この値を変えれば、どの列をどの座標の値にするかを変更できる(はず)

参考資料

2
1
0

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
2
1