Skip to content
/ igp Public

an interactive gnuplot interface for easy 2D plotting of time series data from csv files

License

Notifications You must be signed in to change notification settings

etringer/igp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

igp

igp.rb is an interactive gnuplot program designed for easy 2D plotting of time series data from CSV files.


usage:

igp.rb [csv file a] [csv file b] ... etc.

by default, the first variable from [csv file a] is plotted in a new window, and details of all files are shown in the terminal. interactive-mode is established.

special x-axis (time) characters

each can have a number in front without spaces y : year m : month w : week d : day h : hour

examples:

NOTE: Any number of these items can be used on a single line with a space between each.

4 |6w y0,5 plot variable 4 from each .csv file; set the time axis from start-time to 6-weeks from that; set the y-axis range from 0 to 5

selecting variables for plotting:

a
plot each variable from [csv file a]

a6
plot variable 6 from [csv file a]

vn
plot the next variable in the file

vp
plot the previous variable in the file

a3,5
plot variable 3 from [csv file a], and variable 5 from all csv files

2,3
plot variables 2 and 3 from all csv files

changing the x-axis (time):

t
set the x-axis range to the largest extent of time

tv
set the x-axis range to the overlapping time

ta
set the x-axis range to the start and end times from [csv file a]

>y
set the x-axis to the next full year

3w
set the x-axis to 3 weeks and centered

|2d
keep the start time as-is, and set the end time to 2 days from that

6m|
keep the end time as-is, and set the start time to 6 months prior to that

0.25y
set the x-axis range to 0.25 years and centered

s2008-6
set the x-axis start time to be June 1, 2008

s2001 e2004
set the x-axis range to be Jan 1, 2001 to Jan 1 2004

c2014-10-1
set the x-axis center point to this date

>
move one entire time axis forward in time

>>
move two whole time axes forward in time

3<
move 3 whote time axes backward in time

<>
expand time outward

><
shrink time inward

<4>
expand time outward, faster

>0.2<
shrink the time axis by 20 percent

|>>
retain the start time, but move the end time forward

>|
move the start time forward, but retain the end time

changing the y-axis (data):

y100,450
set the y-axis range from 100 to 450

y-5
set the y-axis lower limit to -5

y,85
set the y-axis upper limit to 85

y
set the y-axis to auto-mode (this will automatically determine the y-axis limits); if the y-axis is already in auto-mode, then this will set the time axis to a centered 1-year range

recognized options:

-s
toggle :show_cmd

-lw=2
set :linewidth to 2

-style=lp
set :style to linepoints

other:

i
display file info

q
quit the program

carriage-return
do the previous command again

assumptions about the input CSV files:

variable names must be a comma-separated list on a single line in the file,
beginning with the word 'fields,'

the input csv file(s) time format is '%Y-%m-%d %H:%M:%S'

any lines that begin with a non-numeric character are ignored in the input csv file(s)

About

an interactive gnuplot interface for easy 2D plotting of time series data from csv files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages