dynamic - Generating gnuplot eps files via script in php -
i asked similar question few days ago, of different flavor; more specific.
i have php file creates gnuplot script dynamically, , runs script using 4 text files (1 per line of plot) created beforehand php file.
the problem graph.eps files generated blank , cannot figure out. have feeling has directory text files in.
this file generate , run.
set terminal postscript enhanced color set size ratio 0.7058 set output '/srv/../a.2.5.1a.eps' set grid set key font "arial,10" set key center bot set key out vertical set key horizontal center set key box set style line 1 linetype 1 linecolor rgb "red" linewidth 2.000 pointtype 6 pointsize default set style line 3 linetype 1 linecolor rgb "#daa520" linewidth 2.000 pointtype 6 pointsize default set style line 4 linetype 1 linecolor rgb "#006400" linewidth 2.000 pointtype 6 pointsize default set style line 6 linetype 1 linecolor rgb "blue" linewidth 2.000 pointtype 6 pointsize default set multiplot set palette model rgb functions 0.8+gray/3, 0.8+gray/3, 0.8+gray/3 set pm3d map set isosample 100,100 unset colorbox unset border unset xtics unset ytics set nokey set nolabel set size 1.025,1.2 set origin -0.021,-0.06 splot y t ' ' set title "section a.2.5.1a test results" set key box set key horizontal center bot set y2tics 0 , 200 set ytics nomirror set xtics nomirror set border set xtics 250 set xtics font "arial,8" set ytics 1750 set size 1,1 set xtics out offset -1,-0.5 set xtics rotate 45 unset origin unset x2tics set xlabel "loop length, 26awg(kft)" set ylabel "downstream data rate (kbps)" set y2label "upstream data rate (kbps)" set xrange [ 250 : 5500 ] noreverse nowriteback set yrange [ 0 : 14000 ] noreverse nowriteback set y2range[ 0 : 1400 ] noreverse nowriteback set bmargin 7 plot "dse_a.2.5.1a.txt" ls 4 title 'expected downstream rate' linespoints, \ "ds_a.2.5.1a.txt" ls 1 title 'measured downstream rate' linespoints, \ \ "use_a.2.5.1a.txt" axes x1y2 ls 6 title 'expected upstream rate' linespoints, \ "us_a.2.5.1a.txt" axes x1y2 ls 3 title 'measured upstream rate' linespoints unset multiplot
once created, use:
exec( "{$pathname} gnuplot {$file}");
the $pathname cwd file , $file variable explains itself.
i've tried using plot $pathname/ds_a.2.5.1a.txt, etc doesn't work either.
thanks time , apologize lengthy post. changed set output path because long , contains relatively private information.
thanks , forward responses!
edit: read http://linux.byexamples.com/archives/487/plot-your-graphs-with-command-line-gnuplot/ , think maybe not chmod-ing , other command might problem, when try still doesn't work.
since it's being run remotely on server not error messages when manually run gnuplot.
it may instructive display executed command. instead of:
exec( "{$pathname} gnuplot {$file}");
try
$command_to_execute = "$pathname gnuplot $file"; echo $command_to_execute . "\n"; exec( $command_to_execute );
it appears path gnuplot
invalid. may need remove space, this:
$command_to_execute = "{$pathname}gnuplot {$file}";
and may need add slash, this:
$command_to_execute = "{$pathname}/gnuplot {$file}";
Comments
Post a Comment