前の画面〕 〔クリックポイント〕 〔最新の一覧〕 〔全て読んだことにする〕〔全て読んだことにして終了〕 〔終了

1341 re(1):複数のgnuplot
2006/6/16(金)16:48 - 竹の - nolm01.iee.niit.ac.jp - 709 hit(s)

引用する
現在のパスワード


pgnuplot へのパイプを 2 つ開けばいいんだろうと思います。

記事 1336 では system() を使ってましたが、C 言語から 
gnuplot を使う、という場合はむしろこちらの方が普通だと思います。

#define PGNUPLOT "c:\\hogehoge\\pgnuplot.exe"

int main(void)
{
     FILE *p1,*p2;

     if((p1=_popen(PGNUPLOT,"w"))==NULL || (p2=_popen(PGNUPLOT,"w"))==NULL)
       return 0;
     fprintf(p1,"plot sin(x)\n");
     fflush(p1);
     getchar();
     fprintf(p2,"plot cos(x) w l 2\n");
     fflush(p2);
     getchar();
     _pclose(p1);
     _pclose(p2);
     return 0;
}

なお、system() で 2 つ、ってのはどうやるのかはわかりません。


〔ツリー構成〕

【1340】 複数のgnuplot 2006/6/16(金)13:42 y (327)
┣【1341】 re(1):複数のgnuplot 2006/6/16(金)16:48 竹の (610)
┣【1342】 re(2):複数のgnuplot 2006/6/16(金)18:37 松岡 (469)
┣【1345】 re(3):複数のgnuplot 2006/6/16(金)21:17 竹の (146)
┣【1346】 re(4):複数のgnuplot 2006/6/17(土)14:54 松岡 (798)
┣【1343】 re(2):複数のgnuplot 2006/6/16(金)20:48 松岡 (130)
┣【1344】 re(3):複数のgnuplot 2006/6/16(金)21:07 y (76)

前の画面〕 〔クリックポイント〕 〔最新の一覧〕 〔全て読んだことにする〕〔全て読んだことにして終了〕 〔終了

※ 『クリックポイント』とは一覧上から読み始めた地点を指し、ツリー上の記事を巡回しても、その位置に戻ることができます.