Created
August 3, 2015 08:20
-
-
Save nisrulz/9ef28bd6e56492f7d00f to your computer and use it in GitHub Desktop.
Use gunplot in terminal to plot a graph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#For more info check : http://people.duke.edu/~hpgavin/gnuplot.html | |
#Install GnuPLot | |
brew install gnuplot | |
#Before ploting a graph, set the terminal into dumb mode | |
set terminal dumb | |
#To Plot a graph | |
plot cos(x+2) #for a function | |
#for a data set | |
plot "./data.csv" | |
#To save the graph to a file , type the following commands into the terminal after you have plotted your graph | |
#Set terminal into png mode | |
set term png | |
#Set output file | |
set output "graph.png" | |
#Replot the graph | |
replot | |
#Set the terminal back into dumb mode | |
set term dumb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment