data-analysis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
data-analysis [2023/04/18 10:16] – Add mention of Plotly dblume | data-analysis [2024/01/15 09:06] (current) – [GnuPlot] dblume | ||
---|---|---|---|
Line 25: | Line 25: | ||
Here's an example command given the following two files, data.csv and gnuplot_instructions.gpi | Here's an example command given the following two files, data.csv and gnuplot_instructions.gpi | ||
- | gnuplot -e " | + | gnuplot -e " |
<file csv data.csv> | <file csv data.csv> | ||
+ | date, | ||
1992-01-01, | 1992-01-01, | ||
1992-02-01, | 1992-02-01, | ||
Line 58: | Line 59: | ||
set xdata time | set xdata time | ||
set xlabel ' | set xlabel ' | ||
- | set ylabel ' | + | set xtics " |
+ | #set ylabel ' | ||
# | # | ||
Line 70: | Line 72: | ||
# | # | ||
set datafile sep ',' | set datafile sep ',' | ||
+ | set key autotitle columnhead | ||
+ | firstrow = system(' | ||
+ | set xlabel word(firstrow, | ||
+ | set ylabel word(firstrow, | ||
# | # | ||
Line 77: | Line 83: | ||
# | # | ||
#plot f using 1:4 with lines, f using 1:3 with linespoints | #plot f using 1:4 with lines, f using 1:3 with linespoints | ||
- | #plot f using 1:2 with lines title t, f using 1:3 with linespoints title ' | + | #plot f using 1:2 with lines, f using 1:3 with linespoints title ' |
- | plot f using 1:2 with linespoints | + | plot f using 1:2 with linespoints |
+ | </ | ||
+ | |||
+ | If you're making a " | ||
+ | <file bash gnuplot_instructions.gpi> | ||
+ | # Mostly the same as above, until... | ||
+ | |||
+ | # Set your X axis format | ||
+ | set style histogram clustered gap 1 | ||
+ | set style fill solid border -1 | ||
+ | # Finally, plot with boxes | ||
+ | plot f using 1:2 with boxes | ||
</ | </ | ||
Line 153: | Line 170: | ||
set xdata time | set xdata time | ||
set format x ' | set format x ' | ||
- | set xlabel ' | + | set key autotitle columnhead |
- | set ylabel ' | + | set xlabel ' |
set datafile sep ',' | set datafile sep ',' | ||
# You can use: lines, points, linespoints | # You can use: lines, points, linespoints | ||
- | plot ' | + | plot ' |
</ | </ | ||
Line 170: | Line 187: | ||
700 +-------------------------------------------------------------------------------+ | 700 +-------------------------------------------------------------------------------+ | ||
| + | | + | ||
- | | | + | | #Passengers ******* | |
| * | | | * | | ||
600 |-+ *+-| | 600 |-+ *+-| |
data-analysis.1681838162.txt.gz · Last modified: 2023/04/18 10:16 by dblume