gnuplot experiences


# Gnuplot script file for plotting data in file "exercise.dat" # This file is called exer.p set autoscale # scale axes automatically unset log # remove any log-scaling unset label # remove any previous labels set xtic auto # set xtics automatically set ytic auto # set ytics automatically set style data fsteps set title "Exercise progress" set xlabel "Date\nTime" set timefmt "%m/%d/%y\t%H%M" set yrange [ 0 : ] set ylabel "Pushups" set term postscript set output "exercise.ps" set yrange [ 0 : ] set xdata time set format x "%m/%d\n%H:%M" set grid set key left set style line 1 lt -1 lc rgb "#334488" lw 2 ps 2 pt 4 set style line 2 lt -1 lc rgb "#338833" lw 3 set style line 3 lt -1 lc rgb "#883333" lw 2 ps 2 pt 6 plot "exercise.dat" using 1:4 t 'Exercise Pushups' with linespoints ls 1 , \ "exercise.dat" using 1:4 t '', \ "exercisep.dat" using 1:4 t 'Exercise Pullups' with linespoints ls 2, \ "exercises.dat" using 1:4 t 'Exercise Situps' with linespoints ls 3 save "exercise.plt" quit

I am using exercise to motivate me to do a new plot type for each addition. I am learning how to use the functions of gnuplot and convert. The next step is to scale the different categories. Since running and biking will have a different scale I need to determine how to show travel versus time for running and biking.

gnuplot exer.p convert -rotate "+90" exercise.ps exercise.png display exercise.png

I use a script ex.sh above to load and run gnuplot and then convert and rotate the output as the ps postscript is landscape and not portrait, which I don't know why that is, but probably has to do with width height interpretation.

0 comments:

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen