Forrest Sheng Bao <http://forrest.bao.googlepages.com>
This morning I found that my Octave can't plot, like this
octave:1> plot(0:10,sin(0:10))
octave:2> Expected X11 driver: /usr/lib/gnuplot/gnuplot_x11
Exec failed: No such file or directory
See 'help x11' for more details
Since Octave actually called gnuplot to plot diagrams, I tried gnuplot
gnuplot> test
No pop-up X11 window but only output on the shell as ASCII text. Arrgh, how could this happen?
Then I tried a script programmed by myself
forrest@flavia:/forrest/work/ee/ad_hoc/wang/plots$ gnuplot plot3.gp
*** X11 output driver not found, switching to dumb terminal!
*** If you want to use the X11 output, please install the gnuplot-x11 package
Oh, I found the problem. Who removed my gnuplot-x11 package? So, I used apt-get to install it again and everything is OK.
Showing posts with label gnuplot. Show all posts
Showing posts with label gnuplot. Show all posts
2007-02-18
2006-10-23
gnuplot sample script
Forrest Sheng Bao <http://forrest.bao.googlepages.com>
run the command "gnuplot replot.pg"
contents in replot.pg
-------------------
plot './ORG_WCA_SIZE.txt' using 1:2 title 'Original WCA' with linespoints lt 1 pt 6 pointsize 1.5, './EWCA_SIZE.txt' using 1:2 title 'EWCA' with linespoints lt 1 pt 8 pointsize 1.5, './EWCA-TS-SIZE.txt' using 1:2 title 'EWCA-TS' with linespoints lt 1 pt 3 pointsize 1.5
set key 65,7.2
set xlabel 'Maximum Displacement'
set ylabel 'Average number of clusters'
set yrange [6.5:10]
set terminal postscript eps
set output './clusterNO_vs_maxdisp.eps'
set size 0.9,0.7
replot
-------------------
contents in EWCA_SIZE.txt
-------------------
%max_disp vs. cluster number
5 8.43166666666667
10 8.55233333333333
15 8.67733333333333
20 8.83833333333333
25 8.96733333333333
30 9.07866666666667
35 9.115
40 9.19466666666667
45 9.2
50 9.24633333333333
55 9.23466666666667
60 9.27266666666667
65 9.246
70 9.17666666666667
75 9.131
80 9.07866666666667
-------------------
contents in EWCA-TS-SIZE.txt
------------------
%max_disp vs. cluster number
5 7.01933333333333
10 7.18033333333333
15 7.351
20 7.471
25 7.60466666666667
30 7.72866666666667
35 7.81033333333333
40 7.863
45 7.923
50 7.996
55 8.02366666666667
60 8.02333333333333
65 8.02066666666667
70 8.01933333333333
75 7.97966666666667
80 7.97633333333333
------------------
contents in ORG_WCA_SIZE.txt
------------------
%max_disp vs. cluster number
5 8.75333333333333
10 8.91033333333333
15 9.08166666666667
20 9.13466666666667
25 9.23233333333333
30 9.34866666666667
35 9.36066666666667
40 9.42833333333333
45 9.41533333333333
50 9.46266666666667
55 9.47
60 9.44566666666667
65 9.39766666666667
70 9.37466666666667
75 9.327
80 9.276
------------------
run the command "gnuplot replot.pg"
contents in replot.pg
-------------------
plot './ORG_WCA_SIZE.txt' using 1:2 title 'Original WCA' with linespoints lt 1 pt 6 pointsize 1.5, './EWCA_SIZE.txt' using 1:2 title 'EWCA' with linespoints lt 1 pt 8 pointsize 1.5, './EWCA-TS-SIZE.txt' using 1:2 title 'EWCA-TS' with linespoints lt 1 pt 3 pointsize 1.5
set key 65,7.2
set xlabel 'Maximum Displacement'
set ylabel 'Average number of clusters'
set yrange [6.5:10]
set terminal postscript eps
set output './clusterNO_vs_maxdisp.eps'
set size 0.9,0.7
replot
-------------------
contents in EWCA_SIZE.txt
-------------------
%max_disp vs. cluster number
5 8.43166666666667
10 8.55233333333333
15 8.67733333333333
20 8.83833333333333
25 8.96733333333333
30 9.07866666666667
35 9.115
40 9.19466666666667
45 9.2
50 9.24633333333333
55 9.23466666666667
60 9.27266666666667
65 9.246
70 9.17666666666667
75 9.131
80 9.07866666666667
-------------------
contents in EWCA-TS-SIZE.txt
------------------
%max_disp vs. cluster number
5 7.01933333333333
10 7.18033333333333
15 7.351
20 7.471
25 7.60466666666667
30 7.72866666666667
35 7.81033333333333
40 7.863
45 7.923
50 7.996
55 8.02366666666667
60 8.02333333333333
65 8.02066666666667
70 8.01933333333333
75 7.97966666666667
80 7.97633333333333
------------------
contents in ORG_WCA_SIZE.txt
------------------
%max_disp vs. cluster number
5 8.75333333333333
10 8.91033333333333
15 9.08166666666667
20 9.13466666666667
25 9.23233333333333
30 9.34866666666667
35 9.36066666666667
40 9.42833333333333
45 9.41533333333333
50 9.46266666666667
55 9.47
60 9.44566666666667
65 9.39766666666667
70 9.37466666666667
75 9.327
80 9.276
------------------
Subscribe to:
Posts (Atom)