Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2919

Re: gnuplot dates are missing in graph

From Jörg Buchholz <bookwood4new@freenet.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: gnuplot dates are missing in graph
Date 2015-06-04 09:21 +0200
Organization Universitaet Hannover
Message-ID <mkou9a$344$1@newsserver.rrzn.uni-hannover.de> (permalink)
References <2f24af8c-5879-456a-9b84-5b17bc70ec7a@googlegroups.com>

Show all headers | View raw


On 04.06.2015 07:30, Syed Jahanzaib wrote:
> Greetings to all,
>
> I am using gnuplot to generate graphs by taking data from the following file
>
> root@rm:/temp# cat data.txt
> 2015-04-1  23248972
> 2015-04-2  67012325
> 2015-04-3  66622333
> 2015-04-4  61943333
> 2015-04-5  47033536
> 2015-04-6  36863346
> 2015-04-7  56863634
> 2015-04-8  46861736
> 2015-04-9  16863836
> 2015-04-10 93683693
> 2015-04-11 93638693
> 2015-04-12 93638693
> 2015-04-13 23638693
> 2015-04-14 13638693
> 2015-04-15 69363893
> 2015-04-16 33638693
> 2015-04-17 93638693
> 2015-04-18 33638693
> 2015-04-19 13638693
> 2015-04-20 93638693
> 2015-04-21 93638693
> 2015-04-22 63638693
> 2015-04-23 2638693
> 2015-04-24 93638693
> 2015-04-25 93638693
> 2015-04-26 8638693
>
> and gnuplot file is as follows
>
>
> # gnuplot script file for plotting data
> #!/usr/bin/gnuplot
> reset
> set terminal jpeg enhanced
> set output "/var/www/gplot.jpg"
> set xdata time
> set timefmt "%Y-%m-%d"
> set format x "%d/%m"
> set xlabel "Date (day/month)"
> set ylabel "Data Downloaded in MB"
> set title "User Download Report as requested"
> set key below
> set grid
> set boxwidth 0.5
> set style fill solid
> plot "/temp/data.txt" using 1:($2/1024/1024) with impulse title "Daily Usage" lw 10
>
>
> Graph is generating but Date Lables are missing as per day count. like it should show each day label on each bar, is it possible?
>

"set xtics 86400" will set the increment to 86400 seconds and you get 
one label per day. The incr. must be give in seconds.

Jörg

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

gnuplot dates are missing in graph Syed Jahanzaib <aacable79@gmail.com> - 2015-06-03 22:30 -0700
  Re: gnuplot dates are missing in graph Jörg Buchholz <bookwood4new@freenet.de> - 2015-06-04 09:21 +0200
    Re: gnuplot dates are missing in graph Syed Jahanzaib <aacable79@gmail.com> - 2015-06-04 02:48 -0700

csiph-web