LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-22-2012, 09:14 AM   #1
Annielover
Member
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu Server Edition, Fedora 16
Posts: 90

Rep: Reputation: 8
Gnuplot not displaying data correctly


Hi all,

I'm experiencing a little problem with Gnuplot:
I want to make a plot of a data file which contains of 2 colums: the first one is the date
and the second one is the CPU usage in %.
As you can see, multiple CPU times exists for one day.

But, gnuplot only plots the "13/6 64" and the "13/6 62" lines, not the others...

What did I wrong?

Code:
set terminal png truecolor
set output "test.png"
set autoscale
set style data lines
set xdata time
set timefmt "%d/%m"
plot "stats_cpu.txt" using 1:2 with boxes
Code:
13/6    63
13/6    70
13/6    60
13/6    64
14/6    62
14/6    63
14/6    57
Here is the output:

http://imageshack.us/content_round.p...94/testjen.png
 
Old 06-22-2012, 12:07 PM   #2
dru8274
Member
 
Registered: Oct 2011
Location: New Zealand
Distribution: Debian
Posts: 105

Rep: Reputation: 37
Could it be that gnuplot is plotting just two values, one each for when the date (%d/%m) is 13/6 and 14/6? Such that most of your data-points are being plotted against just the same two dates. But if each piece of data can be plotted against its own unique date/time, then the resulting gnuplot output will be much improved.

So you have only plotted your data against day and month. But perhaps if you plotted against hour, day and month (set timefmt "%H/%d/%m"), then each time-point would be unique, and your plot output fixed thusly?

Last edited by dru8274; 06-22-2012 at 12:29 PM.
 
2 members found this post helpful.
Old 06-24-2012, 05:59 AM   #3
Annielover
Member
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu Server Edition, Fedora 16
Posts: 90

Original Poster
Rep: Reputation: 8
Thanks for your help, that worked!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Program for school not displaying correctly l0v1n Linux - Newbie 2 08-20-2009 04:17 PM
8.10 - Keys not displaying correctly anthonysaulnier Ubuntu 3 11-16-2008 03:49 AM
VNC not displaying correctly BallsOfSteel Linux - Software 1 04-22-2008 06:29 PM
gnuplot, pull X data from file, specify Y data at cmd line? hedpe Programming 5 03-16-2007 12:32 AM
windows not displaying correctly zchoyt Linux - General 1 03-19-2005 11:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration