From: <ed...@ke...> - 2005-05-06 10:52:05
|
Hi again, mailing list!! After solving some problems thank to the help of Michael, I succeed with my proyect, but there is still a little detail that I can't find out. And this is: how to make the dates appear successfully on the screen. I'll explain: My x axis must print dates, and as the gnuplot tutorial sais, I've done something like this: $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 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"); And if the points that I'm sending to the program are from 2005-01-01 00:00:00 to 2005-05-01 23:59:59, ..... why the x axis is divided into parts from 2000-01-01 00:00 to 2000-01-01 00:08????? I've tried with everythin, tried to put xranges but it's useless, tried to change the order of the instructions but it's useless, and the really matter is that if dates don't appear correctly.... my proyect has no much sense. Thank you very much if you can help me!! |