Thread View: fj.lang.perl
3 messages
3 total messages
Started by kaoru itou
Wed, 11 Mar 1998 00:00
wgnuplotについて
Author: kaoru itou
Date: Wed, 11 Mar 1998 00:00
Date: Wed, 11 Mar 1998 00:00
8 lines
780 bytes
780 bytes
以下の2点について質問します。 1.perl for Win32からwgnuplotを起動して、グラフを作成する方法を教えてく ださい。 2.www上からwgnuplotを起動して、www上にグラフを表示する事ができるでしょ うか。 mailto:itokaoru@asahi.hitachi.co.jp
Re: wgnuplotについて
Author: Akira NISHIMURA
Date: Wed, 11 Mar 1998 00:00
Date: Wed, 11 Mar 1998 00:00
58 lines
3016 bytes
3016 bytes
In article <350720CD.1EFC@asahi.hitachi.co.jp> kaoru itou <itokaoru@asahi.hitachi.co.jp> writes:
> $B#1!%(Bperl for Win32$B$+$i(Bwgnuplot$B$r5/F0$7$F!"%0%i%U$r:n@.$9$kJ}K!$r65$($F$/(B
> $B$@$5$$!#(B
Windows$BHG$N(B gnuplot $B$G$b!"(BUNIX$BHG$HF1$8$h$&$K!"%W%m%C%H%3%^%s%I$r=q$$$?(B
$B%U%!%$%k$r%3%^%s%I%i%$%s$N0z?t$KM?$($F$d$k$H!"(BWindows$B>e$K%W%m%C%H2DG=(B
$B$G$9!#(B
$B0l$D$NJ}K!$G$9$,!"(Bperl $B$K$h$C$F%W%m%C%H%3%^%s%I$r=q$$$?0l;~%U%!%$%k(B
(tmp.plt)$B$r:n@.$7$F$d$j!"$=$NFbMF$rNc$($P!"(B
plot sin(x) w l
pause -1 "Hit Return to Continue"
$B$H$7$F!"(B
system("wgnuplot tmp.plt");
$B$H$9$l$P!"(BWindows$B>e$K%0%i%U$,I=<($5$l$^$9!"$H8@$$$?$$$H$3$m$G$9$,!"$=(B
$B$N(B gnuplot $B$O(B 16bit $BHG$G$O%@%a$J$h$&$G!"(B32bit$BHG$,I,MW$J$h$&$G$9!#;d$O(B
$BElKLBg$N(Bftp$B%5!<%P$+$i<h$C$FMh$?$H;W$$$^$9!#(B
> $B#2!%(Bwww$B>e$+$i(Bwgnuplot$B$r5/F0$7$F!"(Bwww$B>e$K%0%i%U$rI=<($9$k;v$,$G$-$k$G$7$g(B
> $B$&$+!#(B
$B>e5-$,$&$^$/9T$1$P!"!V(BCGI$B%W%m%0%i%_%s%0!W$H$$$&K\$K!"(BUNIX$BHG(Bgnuplot$B$r;H$C(B
$B$?(BWWW$B>e$X$NI=<(J}K!$,2r@b$5$l$F$"$C$?$H;W$&$N$G!"$=$l$K=>$($P$&$^$/$$(B
$B$/$O$:$G$9!#(B
$B$?$7$+!"(Bgnuplot $B$N(B Terminal $B$r(B pbm $B$+2?$+$K$7$F$G$-$?%U%!%$%k$r!"(B
system$B$G%3%^%s%I$r8F$S=P$7$F(B gif $B$KJQ49$7$F%U%!%$%k$K$9$k!"$H$$$&$h$&(B
$B$JJ}K!$@$C$?$H;W$$$^$9!#%3%^%s%I%i%$%s$G$N2hA|%U%!%$%kJQ49$K$O(B Windows
$BHG(BImageMagick $B$K4^$^$l$k(B convert $B$,;H$($k$O$:$G$9!#(B($B$3$l$O$I$3$N%5!<%P(B
$B$KCV$+$l$F$$$?$+K:$l$^$7$?(B)
$B$5$C$-$N(B tmp.plt $B$NF,$K(B
set term pbm
set output "tmp.pbm"
$B$r$/$C$D$1$F!"(Bpause$B$N9T$r>C$7!"(B
system("wgnuplot tmp.plt");
system("convert tmp.pbm tmp.gif");
$B$C$A$e!<46$8$G$9$+$M!#(Bconvert $B$K$O(B -density $B%*%W%7%g%s$rIU$1$F!"=jK>$N(B
$B2rA|EY$KD4@a$9$kI,MW$,$"$k$+$b$7$l$^$;$s!#$H$j$"$($:!"(Bperl for Win32 +
wgnupl32 + convert $B$J$i!"$3$3$^$G$O=PMh$^$9!#8e$O!"@8@.$9$k(BHTML$B%U%!%$(B
$B%k$K(B tmp.gif $B$rI=<($5$;$k%?%0$r=q$/!#(B
$B!t$1$I!"(BWindows$B>e$G$N(BCGI$B%W%m%0%i%_%s%0$*$h$S(Bhttp$B%5!<%P$K$D$$$F$OA4$/CN$i(B
$B!t$J$$$N$G%[%s%H$K$G$-$k$+$I$&$+$OJ,$+$j$^$;$s!#(B
_/_/_/ _/ _/ _/ _/_/ $BEl5~>pJsBg3X(B $B7P1D>pJs3XIt(B
_/ _/ _/ _/ |$B!!!!!!(B $B>pJs3X2J(B $B!!(B $B!!@>B<(B $BL@(B
_/okyo _/_/niversity of _/nformation _/_/ciences akira@rsch.tuis.ac.jp
http://www.rsch.tuis.ac.jp/~akira
Re: wgnuplotについて
Author: Yasuyuki Mukai
Date: Wed, 18 Mar 1998 00:00
Date: Wed, 18 Mar 1998 00:00
75 lines
2583 bytes
2583 bytes
kaoru itou wrote: > 2.www上からwgnuplotを起動して、www上にグラフを表示する事ができるでしょ > うか。 # もし、「unix上での方法は知っとるわい。Windowsの事が知りたいのじゃ。」と # 言う事でしたら無視して下さい。 最近unix上で同じ事をやったので、参考までに方法を載せて見ます。 ただし、Windowsでは変更の必要があると思いますし、また、Windows のhttpdは色々な種類があるので、何か限定しないと方法が異なるかも 知れません。 # ちなみに、ここで問題になるのは $PPMTOGIF = '/usr/X11R6/bin/convert PNM:- GIF:-'; # に相当するものがWindows上にあるかどうかだと思います。 # wgnuplotのHELPにはPBMPLUS packageで出来るような事が書いてありますが。 それでは見本です。まずHTMLファイル。 gnuplot_test.htm <HTML> <HEAD> <TITLE>gnuplot test</TITLE> </HEAD> <BODY> <CENTER> <H1>gnuplot test</H1> <IMG SRC="cgi-bin/gnuplot_test.cgi" ALT="test" > </CENTER> </BODY> </HTML> 次にperlスクリプトです。 gnuplot_test.cgi #!/usr/local/bin/perl $GNUPLOT = '/usr/contrib/bin/gnuplot'; $PPMTOGIF = '/usr/X11R6/bin/convert PNM:- GIF:-'; $|=1; print "Content-type: image/gif\n\n"; open (GRAPH,"| $GNUPLOT | $PPMTOGIF") || die ; print GRAPH <<END; set term pbm color set size 0.5,0.5 set grid set autoscale set time set title "Access log" set xlabel "Day" set ylabel "Count" 1 plot '-' using 2 notitle with impulses # log(HTML Page) #Date Counts 1996/03/27 25 1996/03/28 43 1996/03/29 0 1996/03/30 11 1996/03/31 11 1996/04/01 66 1996/04/02 133 1996/04/03 82 END close GRAPH; exit; 実行結果は以下を参照してください。 http://www.imasy.or.jp/~yasuyuki/test/gnuplot_test.htm # wgnuplotでは # plot '-' using 2 notitle with impulses # のような記述はできないようです。
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads