GNUPLOT problem


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers GNUPLOT problem
# 1  
Old 10-28-2011
GNUPLOT problem

Hi,
Im trying to plot a time series with gnuplot. this is my script
Code:
set xdata time
set yrange [0: ]
set timefmt "%H"
set xrange [ "11:14:00":"11:15:00" ]
set format x "%H:%M:%S"
plot "time_vs_times.txt" using 1:2 title 'Interarrival time' with points lw 2

and this is my data
11:14:18 5
11:14:19 10
11:14:20 14
11:14:21 28
11:14:22 44
11:14:23 41
11:14:24 42
11:14:25 45
11:14:26 34
11:14:27 35
11:14:28 12
11:14:29 10
11:14:30 36
11:14:31 8
11:14:32 9
11:14:33 6
11:14:34 32
11:14:35 31
11:14:36 13
11:14:37 24
11:14:38 25
11:14:39 23
11:14:40 16
11:14:41 10
11:14:42 9
11:14:43 20
11:14:44 19
11:14:45 16
11:14:46 7
11:14:47 12
11:14:48 4
11:14:49 22
11:14:50 8
11:14:51 6
11:14:52 23
11:14:53 20
11:14:54 18
11:14:55 8
11:14:56 6
11:14:57 11
11:14:58 18
11:14:59 7

Everytime i try to plot the data, i dont get xaxis from 11:14:00 to 11:15:00, it always gives me a scale from 11:00 to 12:00.

I do not understand why..pl help me..

Thanks!
# 2  
Old 10-28-2011
Are you sure this is the right forum? ( I cant imagine a UNIX newbie dealing with this sort of issue...)
# 3  
Old 10-28-2011
I'm sorry, but I did not find some forum related directly to this issue. Let me know if there is a better place to put it up.
# 4  
Old 10-28-2011
Try leaving off xrange entirely, letting it pick its own range.

Otherwise, I think you have to specify the range in seconds of epoch time. GNUplot has an epoch of 1970 for some things, and an epoch of 2000 for others Smilie

Try just forgetting the year/month/day and just going on the total count of seconds
# 5  
Old 10-28-2011
Tried that but still the same output Smilie

will try with epoch times soon, thanks Smilie

---------- Post updated at 07:12 PM ---------- Previous update was at 07:04 PM ----------

my epoch has a high resolution 6digits after the decimal, but the resolution that I want is per second..Im actually converting data from epoch to H:M:S so that I can have this. any other way?? Smilie
# 6  
Old 10-28-2011
If your data has higher resolution than seconds, what does it actually look like? You've only got HH:MM:SS there.

Epoch time is per second.

Try xrange [ (11*60*60)+(14*60), (11*60*60)+(15*60)]
# 7  
Old 10-28-2011
The thing is I have my timestamp in epoch and is something like xxxxxxx.xxxxxx the part after the '.' is sub second. So from this i convert it to normal time ignoring the sub second part. and what I want to do is obtain number of times that event has occurred. I use uniq -c -w8 for this.

To do the same in epoch i have to filter in awk just the part before sub seconds and then use uniq on it. trying to figure the awk part now...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Gnuplot in bash

Hi, I want a graph plot using gnuplot for df -h command. like filesystem, total size and avail size. Thanks, Anjan ---------- Post updated at 02:35 PM ---------- Previous update was at 02:34 PM ---------- I want a graph plot using gnuplot for df -h command per hour. (4 Replies)
Discussion started by: Anjan1
4 Replies

2. Shell Programming and Scripting

Problem creating graph with gnuplot with time on x-axis

Let me start by saying I'm new to gnuplot and not very good at unix at all.. Anyway, I'm each minute measuring temperature and humidity and saves the last 60 readings along with time in a textfile, values_minute. The contents of the file is formatted like this: time temperature humidity ... (8 Replies)
Discussion started by: hakro807
8 Replies

3. Shell Programming and Scripting

gnuplot horizontal

simple question I thought. How do I setup a chart in gnuplot that draws a "upper threshold" for a given set of data. I have the graph charting fine. I have peaks and valleys. I can either setup a number that I want to be the "upper threshold". a horizontal line based either in the data,... (5 Replies)
Discussion started by: kag3ythree
5 Replies

4. Emergency UNIX and Linux Support

GNUPLOT help needed

Dear All, I am new to GNUPLOT :D and dont know how it works, but actually there is a LINUX script generated by me which is running & capturing data in real time, the problem is that i want to plot that data in real time using GNUPLOT.:confused: please help.:wall: (5 Replies)
Discussion started by: jojo123
5 Replies

5. Shell Programming and Scripting

xargs and gnuplot

Hi All, Seems I have an xargs stdin problem that I don't understand. I have a script (call it myscript.sh) that takes the names of one or more file(s) specified on the command line and creates a single gnuplot command file containing multiple records, one for each specified file. Each of... (9 Replies)
Discussion started by: paulianna2002
9 Replies

6. UNIX and Linux Applications

gnuplot limitations

I'm running a simulation (programmed in C) which makes calls to gnuplot periodically to plot data I have stored. First I open a pipe to gnuplot and set it to multiplot: FILE * pipe = popen("gnuplot", "w"); fprintf(pipe, "set multiplot\n"); fflush(pipe); (this pipe stays open until the... (0 Replies)
Discussion started by: sedavidw
0 Replies

7. UNIX and Linux Applications

GNUplot

Hi, I am trying to make a plot of an ASCII file using GNUplot, but I keep getting error msg: for example plot filename.txt It says that (.txt ) is not identified ... I tried to write it without the .txt part, but I also get the error msg. Any idea why? :confused: (1 Reply)
Discussion started by: cosmologist
1 Replies

8. AIX

Sarcheck - gnuplot 3.7.1

Good Afternoon, I'm having an issue finding the correct libX11.a fileset on my 595 running AIX 5.3.0.0. Currently I'm trying to instal Sarcheck on my nim master. The problem occurs during the GNUPLOT installation. error: failed dependencies: libX11.a(shr4.o) is needed by gnuplot-3.7.1-1... (3 Replies)
Discussion started by: vincent1117
3 Replies

9. UNIX for Dummies Questions & Answers

Help with gnuplot

Hi, I am a beginner using UNIX, and was wondering how to use gnuplot from UNIX on my pc. I am connected remotely to my work's UNIX server using Secure Shell Client, and gnuplot won't open a new window when I use the plot command. How do I do this? Moreover, is it possible to save things from the... (0 Replies)
Discussion started by: KTTFB64
0 Replies
Login or Register to Ask a Question