From: <ed...@ke...> - 2005-05-06 10:45:06
|
Thank you all very much. I finally found that the problem was with "using" . This is the code with which my program works! $fp = popen("gnuplot -","w"); fputs($fp,"set title \"".$ejey." de los telefonos: ".$telefonos." desde: ".$limite_inferior." hasta: ".$limite_superior." \"\n"); fputs($fp,"set format y \"%.3f\"\n"); fputs($fp,"set xlabel \"Fecha\"\n"); fputs($fp,"set ylabel \"".$ejey."\"\n"); fputs($fp,"set yrange [:]\n"); fputs($fp,"set timefmt \"%Y-%m-%d %H:%M:%S\"\n"); fputs($fp,"set xdata time\n"); fputs($fp,"set format x \"%Y-%m-%d %H:%M\"\n"); fputs($fp,"set ytics 0.25\n"); fputs($fp,"set xtics autofreq\n"); //fputs($fp, "set xrange [\"".$limite_inferior."\" : \"".$limite_superior."\"\n"); fputs($fp,"set nomx2tics\n"); fputs($fp,"set nomy2tics\n"); fputs($fp,"set grid\n"); fputs($fp,"set size 2\n"); fputs($fp,"set lmargin 7\n"); fputs($fp,"set rmargin 2\n"); fputs($fp,"set tmargin 3\n"); fputs($fp,"set bmargin 3\n"); fputs($fp,"set boxwidth 10\n"); fputs($fp,"set output \"/var/www/smtustat/salida_gnuplot.png\"\n"); fputs($fp,"set terminal png\n"); fputs($fp,$string_plot."\n"); for($i=0; $i<$total; $i++) Do you know if there is any way to call from php to gnuplot, send all the points that I send... but not creating a file called "salida_gnuplot.png", but simply createn an image on the screen?? I am interested in this fact so that more than one user can have access to the file at the same time. Thank you very much again! and I hope this little and simple code can help somebody. See you!! |