From the course: Command Line Data Analysis
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
gnuplot: Bar charts - Unix Tutorial
From the course: Command Line Data Analysis
gnuplot: Bar charts
- [Instructor] Let's have a look at bar charts, which are usually a good way to display discrete data. So I have my daily rides and let's have a look at the head, and we have the date and the rides so I'm going to pipe it through sed, replace the comma with space and then through gnuplot dash e. And then I'm going to say, I'm going to set the terminal to png, and I'm saying plot, the standard input, which is the dash, using zero and two. So zero is the pseudo column, which are running numbers, and two is the actual column here, which have the values. This time I'm going to say with boxes. And I'm going to give you the title rides. And now I'm going to close the script and redirect the output to chart.png. And here we have the generated chart and you can see what is going on here. We have a nice title with rides. One thing I don't like is, if you look at the x axis below, these are just numbers. We would like to get the…