Part of my date file:
17:33:57 50.1875
17:34:01 50.1875
17:34:05 50.3125
17:34:10 50.3125
My gnuplot script:
set term png size 2000, 400
set xdata time
set timefmt "%H:%M:%S"
set format x "%H:%M:%S"
set grid
set xlabel "czas"
set ylabel "temperatura"
set title "Pomiar z dnia 2009.03.14"
set yrange [36:62]
set ytics 2
set xrange ["17:30:00":"24:00:00"]
set xtics "17:30:00", "00:30:00", "24:00:00"
set output "2009.03.14.png"
plot "2009.03.14.txt" using 1:2 with points lt 1 pt 6 ps 1 notitle
Part of resulting image: http://img150.imageshack.us/my.php?image=tempb.png
Without these lines:
set xrange ["17:30:00":"24:00:00"]
set xtics "17:30:00", "00:30:00", "24:00:00"
script generates almost the same image ( no strange mtics)
I am newbie with gnuplot, please help me, btw I did not find
any helpful solution via google.
Thanks in advance
MarcinB
> Hello, I have problem with formating xtics, I need xtics for, let say
> every 30 minutes.
>
> Part of my date file:
> 17:33:57 50.1875
> 17:34:01 50.1875
> 17:34:05 50.3125
> 17:34:10 50.3125
>
> My gnuplot script:
>
> set term png size 2000, 400
> set xdata time
> set timefmt "%H:%M:%S"
> set format x "%H:%M:%S"
> set grid
> set xlabel "czas"
> set ylabel "temperatura"
> set title "Pomiar z dnia 2009.03.14"
> set yrange [36:62]
> set ytics 2
> set xrange ["17:30:00":"24:00:00"]
> set xtics "17:30:00", "00:30:00", "24:00:00" set output "2009.03.14.png"
unset mxtics
> plot "2009.03.14.txt" using 1:2 with points lt 1 pt 6 ps 1 notitle
>
> Part of resulting image:
> http://img150.imageshack.us/my.php?image=tempb.png
>
> Without these lines:
>
> set xrange ["17:30:00":"24:00:00"]
> set xtics "17:30:00", "00:30:00", "24:00:00"
>
> script generates almost the same image ( no strange mtics)
>
> I am newbie with gnuplot, please help me, btw I did not find any helpful
> solution via google.
>
> Thanks in advance
>
> MarcinB
Hi,
1/ Add
unset mxtics
like I already did above in your example.
This suppresses the default minor tics.
Then you will have the major tics only every 30 minutes, which is what
you wanted.
I looked at your example image - it is a bit strange.
It shows 2 minor ticks between each major tic, and only just following
the major tic, and then a gap.
By default I would expect to see 4 minor tics equally spaced between
each major tic.
Maybe you need to upgrade your gnuplot?
2/ If you didn't already read it, I recommend the gnuplot manuals from
here: http://www.gnuplot.info/documentation.html
Cheers,
Peter
I changed my script:
unset mxtics
...
set xtics "17:30:00", "00:30:00", "24:00:00" font "arial,20" offset
0,-2
...
I got rid of strange minor tics but it did not solve the main problem:
http://img528.imageshack.us/my.php?image=temp2.png
BTW gnuplot 4.2 patchlevel 3
Thanks again
MarcinB
Maybe it is connected to my problem.
MarcinB
topic closed
MarcinB
Hi,
I usually use 4.3, which is not yet officially released; but also have
4.2 patchlevel 3.
I compared the results betwen the very latest 4.3 from cvs - 18 March
2009, and 4.2 patchlevel 3.
They are different! Perhaps a bug in 4.2 which is fixed in 4.3.
I think that my results with 4.3 are what you want.
Take a look here: http://tinyurl.com/cvj6d9
Can you try with gnuplot 4.3?
Cheers,
Peter