DJ-1701 Posted June 9, 2017 Posted June 9, 2017 Just wondering if anyone knows of a script, or a program that can be run to quickly create a Graph of simple two column data in a CSV file? Want to do something automatically each day but too lazy thought it would be more efficent than doing this manually all the time.
bald_pig Posted June 9, 2017 Posted June 9, 2017 Quick google gives this? https://plot.ly/python/plot-data-from-csv/ 1
DJ-1701 Posted June 9, 2017 Author Posted June 9, 2017 Thanks for the suggestions both. Plot.ly appears to be an online service, which unforuntalty kinda takes the automation out of it. As for Gnuplot... at the moment I can't get my head around importing data from a CSV.
bald_pig Posted June 9, 2017 Posted June 9, 2017 Thanks for the suggestions both. Plot.ly appears to be an online service, which unforuntalty kinda takes the automation out of it. As for Gnuplot... at the moment I can't get my head around importing data from a CSV. It's an API, so you can program to send off the data and get back the image. 1
pcstru Posted June 9, 2017 Posted June 9, 2017 Thanks for the suggestions both. Plot.ly appears to be an online service, which unforuntalty kinda takes the automation out of it. As for Gnuplot... at the moment I can't get my head around importing data from a CSV. Do you have some sample data? 1
DJ-1701 Posted June 9, 2017 Author Posted June 9, 2017 Do you have some sample data? Good point... example CSV data in code tags below. User,Pages Alex,234 Bob,215 Carol,63 Daisy,61 Edward,55 Freya,25
pcstru Posted June 9, 2017 Posted June 9, 2017 So I create a file with your data "thedata.csv" and a file "SpecFile.txt" which contains the following : set title 'My Graph' set ylabel 'Pages' set xlabel 'People' set term png set output 'test.png' set datafile separator "," plot "thedata.csv" using 2:xticlabels(1) with histogram I can then produce a graph from the command line : C:\Progra~1\gnuplot\bin\gnuplot < SpecFile.txt Not pretty but hopefully that is helpful as a starting point. 1
DJ-1701 Posted June 9, 2017 Author Posted June 9, 2017 So I create a file with your data "thedata.csv" and a file "SpecFile.txt" which contains the following : set title 'My Graph' set ylabel 'Pages' set xlabel 'People' set term png set output 'test.png' set datafile separator "," plot "thedata.csv" using 2:xticlabels(1) with histogram I can then produce a graph from the command line : C:\Progra~1\gnuplot\bin\gnuplot < SpecFile.txt [ATTACH=CONFIG]43756[/ATTACH] Not pretty but hopefully that is helpful as a starting point. Thanks very much @pcstru, brilliant starting point!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now