gnuplot

C言語+gnuplot+popenを使った簡単なアニメーション作成プログラム

popenコマンドを使ってC言語からgnuplotを呼び出す短いプログラム。 $ gcc a.c && ./a.out でサイン関数のアニメーションが作成される。 a.c #include <stdio.h> #include <stdlib.h> #include <math.h> double t,dt; int main(){ double t=0,dt=0.01; FILE *gp; gp = popen("gnuplot --</math.h></stdlib.h></stdio.h>…

gnuplotの初期設定を変更する:gnuplotrcの場所(Mac)

gnuplotを起動した時のデフォルトの設定(term,line style,line colorなど)が気に入らない場合には 次のようにしてgnuplotrcを編集することにより、デフォルト設定を変更することができる。ターミナルから $gnuplotでgnuplotを起動し、 >show loadpathとす…