Sponsored Content
Top Forums Shell Programming and Scripting Problem creating graph with gnuplot with time on x-axis Post 302794355 by hakro807 on Monday 15th of April 2013 05:54:11 PM
Old 04-15-2013
I succeeded in creating a good-looking graph for the last 60 minutes. Format for data is
Code:
hh:mm value1 value2

Code:
set terminal png
set output "hour_graph.png"
set yrange [10:50]
set ylabel "Temperatur Celsius/Luftfuktighet procent"
set timefmt "%H:%M"
set xdata time
set xtics "00:00", 900, "24:00" #guess it will mess up temporarily at 24:00
set mxtics 3 #a small tic every five minute
set format x "%H:%M" #set format x was needed to format the x axis as hh:mm, not hh:mm:ss

plot "./hour_graph_values" using 1:2 title 'Temperatur' with lines, \
"./hour_graph_values" using 1:3 title 'Luftfuktighet' with lines

Would still love to know the syntax for letting gnuplot deal with both date and time.
At the moment the main log is in the following format:
yyyy-mm-dd hh:mm value1 value2

I just can't believe gnuplot would not be able to deal with something which most be so common.
 

9 More Discussions You Might Find Interesting

1. OS X (Apple)

Adjust X & Y screen axis

I'm using my wife's Macbook, and I just noticed that her screen is off axis, but I can't find a way to adjust it. I've tried playing around with resolution in preferences, but nothing. Maybe a terminal command for adjusting the x and y values of the screen? Any and all suggestions welcomed :) (2 Replies)
Discussion started by: andou
2 Replies

2. UNIX for Dummies Questions & Answers

sar Vs. gnuplot time format

Hi, I want to generate gnuplot graph from sar data. My problem is the time format. 1- Gnuplot doesn't support the sar format (01:00:59 AM/PM) 2- Sar doesn't provide a switch to choose the format. The only way to do it is by exporting LANG=fr_FR. Since I have other apps running and... (0 Replies)
Discussion started by: foxmtl
0 Replies

3. UNIX for Dummies Questions & Answers

GNUPLOT problem

Hi, Im trying to plot a time series with gnuplot. this is my script set xdata time set yrange set timefmt "%H" set xrange 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... (10 Replies)
Discussion started by: jamie_123
10 Replies

4. Shell Programming and Scripting

Transposing X and Y axis of CSV data

Hello list, I have a source CSV data file as follows: PC_NAME,MS11-040,MS11-039,MS11-038,MS11-035 abc123,Not Applicable,Not Applicable,Not Applicable,Not Applicable abc987,Not Applicable,Not Applicable,Not Applicable,Not Applicable tnt999,Not Applicable,Not Applicable,Applicable,Not... (2 Replies)
Discussion started by: landossa
2 Replies

5. Programming

Creating a line graph in jqplot

I have a piece of code here that should create a line graph consisting of two lines. It will not render the lines and neither the dates on the x-axis. The y-axis is apparently already scaled for the y-values, so the data interpretation went correctly for at least some of the data. Does anybody see... (0 Replies)
Discussion started by: figaro
0 Replies

6. UNIX and Linux Applications

GnuPlot - 2d-graph --> depending from size, different color

Hi, i would like to change color depending from the valuerange. a gnuplot-script will generate a multiplot and in one graph, the ranges should have different colors, e.g. 100 ... 133 --> red 200 ... 233 --> blue 300 ... 333 --> orange 400 ... 433 --> green #Partikeldata - Partikel... (1 Reply)
Discussion started by: IMPe
1 Replies

7. Shell Programming and Scripting

gnuplot flat line graph

Hi, I'm not able to find a solution because I cant find the exact keyword for this. I wanna make a graph like ive shown in the attachment. Could someone please share ideas on how to do this. Thanks! (3 Replies)
Discussion started by: jamie_123
3 Replies

8. Programming

Draw Bar Graph for GNUPLOT

For example, I have a file called data.txt. And the content is: Iker_Casillas 181 Raphael_Varane 182 Sergio_Ramos 182May I know how to write a script for gnuplot, so I can have a bar graph as the column 1 will be the x and column 2 will be the y? And I hope that the x value can be seen clearly.... (0 Replies)
Discussion started by: Tzeronone
0 Replies

9. Shell Programming and Scripting

Gnuplot Time Data Question

I have a data file of the following format: servername,2013-05-11 17:46:03,SomeText,195,195,11,202 servername,2013-05-11 17:47:03,SomeText,192,192,23,103 servername,2013-05-11 17:48:03,SomeText,189,190,14,117 servername,2013-05-11 17:49:03,SomeText,196,195,24,231 ... ... I want to... (0 Replies)
Discussion started by: BeeryM
0 Replies
GPSPROF(1)							GPSD Documentation							GPSPROF(1)

NAME
gpsprof - profile a GPS and gpsd, plotting latency information SYNOPSIS
gpsprof [-f plot_type] [-m threshold] [-n packetcount] [-t title] [-T terminal] [-d dumpfile] [-l logfile] [-r] [-D debuglevel] [-h] [[server[:port[:device]]]] DESCRIPTION
gpsprof performs accuracy and latency profiling on a GPS. It emits to standard output a GNUPLOT program that draws an illustrative graph. It can also be told to emit the raw profile data. The information it provides can be useful for establishing an upper bound on latency, and thus on position accuracy of a GPS in motion. gpsprof uses instrumentation built into gpsd. To display the graph, use gnuplot(1). Thus, for example, to display the default spatial scatter plot, do this: gpsprof | gnuplot -persist To generate an image file: gpsprof -T png | gnuplot >image.png OPTIONS
The -f option sets the plot type. The X axis is samples (sentences with timestamps). The Y axis is normally latency in seconds. Currently the following plot types are defined: space Generate a scattergram of fixes and plot a probable-error circle. This data is only meaningful if the GPS is held stationary while gpsprof is running. This is the default. uninstrumented Plot total latency without instrumentation. Useful mainly as a check that the instrumentation is not producing significant distortion. It only plots times for reports that contain fixes; staircase-like artifacts in the plot are created when elapsed time from reports without fixes is lumped in. instrumented Plot instrumented profile. Plots various components of the total latency between the GPS's fix time fix and when the client receives the fix. For purposes of the description, below, start-of-reporting-cycle (SORC) is when a device's reporting cycle begins. This time is detected by watching to see when data availability follows a long enough amount of quiet time that we can be sure we've seen the gap at the end of the sensor's previous report-transmission cycle. Detecting this gap requires a device running at 9600bps or faster. Similarly, EORC is end-of-reporting-cycle; when the daemon has seen the last sentence it needs in the reporting cycle and ready to ship a fix to the client. The components of the instrumented plot are as follows: Fix latency Delta between GPS time and SORC. RS232 time RS232 transmission time for data shipped during the cycle (computed from character volume and baud rate). Analysis time EORC, minus SORC, minus RS232 time. The amount of real time the daemon spent on computation rather than I/O. Reception time Shipping time from the daemon to when it was received by gpsprof. Because of RS232 buffering effects, the profiler sometimes generates reports of ridiculously high latencies right at the beginning of a session. The -m option lets you set a latency threshold, in multiples of the cycle time, above which reports are discarded. The -n option sets the number of packets to sample. The default is 100. The -t option sets a text string to be included in the plot title. The -T option generates a terminal type setting into the gnuplot code. Typical usage is "-T png" telling gnuplot to write a PNG file. Without this option gnuplot will call its X11 display code. The -d option dumps the plot data, without attached gnuplot code, to a specified file for post-analysis. The -l option dumps the raw JSON reports collected from the device to a specified file. The -r option replots from a JSON logfile (such as -l produces) on standard input. Both -n and -l options are ignored when this one is selected. The -h option makes gpsprof print a usage message and exit. The -D sets debug level. Sending SIGUSR1 to a running instance causes it to write a completion message to standard error and resume processing. The first number in the startup message is the process ID to signal. SEE ALSO
gpsd(8), gps(1), libgps(3), libgpsd(3), gpsfake(1), gpsctl(1), gpscat(1), gnuplot(1). AUTHOR
Eric S. Raymond esr@thyrsus.com. The GPSD Project 10 Feb 2005 GPSPROF(1)
All times are GMT -4. The time now is 12:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy