A few people are asking about the content of the .dat files. I suspect they are just plain text files with an X and Y value on each line, separated with a space.
Yes, it is a white space delimited text file. Here is a neat trick to generate 1000 pts of sample sine wave data on OSX or Linux terminal using 'yes', 'head', and 'awk' (the $ is the terminal prompt so don't include it): $ yes ' ' | head -n 1000 | awk '{print c++, sin(c)}' awk is very powerful and I strongly recommend it to anyone that wants to be a power user!
Sir, great video. Thanks a lot. For OSX users, If you have troubles in the installation the better way its install: "Homebrew. The missing package manager for OS X". Google for that. Then type in a terminal: brew install gnuplot --wx. And thats it, that works in my case. Just one doubt, Whats the name of your font in the terminal? :)
Hello! thanks for the wonderful tutorial. I have data in this formate apple 1 bananna 3 ornage 5 fig 4 I want the x axis data to appear in the plot and not in the axis as such. Moreover they are words and not numbers. How can I do it please?
Any postscript viewer will work. In OSX you can just you Preview. On linux you can use evince or any of the many other viewers. In Windows the only answer I know of is ghostview but I don't use windows much.
hello, i made using linspace vector x and now i would like to draw graph for function y=(x-1)/(x+1). to be concrete: x=linspace(0.5,2,50) y=(x.-1)/(x.+1) plot (x,y) but it fails in function y and write error something like: undefined near line column where i am making mistake?
thanks. my graph used to pop up after i load it in gnuplot. now it doesn't. i tried 'gnuplot file.gp -' and also inluding 'pause -1' in the file.gp. neither works. any thoughts?
I seems to have the simplest problem can't solve. I typed in plot "data" and couldn't plot it. they say the file is unreadable, but I have a file named data and have data on it. Don't know what's wrong with it.
1. Install a pkg manager for osx... I prefer homebrew - brew.sh/ macPorts is an alternative - macports.org/install.php 2. Dwonload gnuplot - gnuplot.info/ 3. install gnuplot via terminal using the command - *brew install gnuplot* Note: if you installed MacPorts then you'll need - *port install gnuplot* Also if you do not have xquartz installed you may want to do that first
I can't open .dat file, in which directory should it be stored for gnuplot to open it or how can I give the location of that file to gnuplot? help please :(
+Kakhi Kiknadze use "pwd" to see where you are, and then "cd" to go to the file of your choice. Example: gnuplot > pwd _____(shows where you are) gnuplot > cd 'Desktop' (this goes to the desktop) Using this you can navigate to the folder where you data file is.
+Satyajit Dhawale you store the .dat file anywhere you want. What you need to do though is you need to open gnuplot while you are in within that file in terminal. eg. if your .dat file is under Documents, you go INTO that Documents file, and open Gnuplot there.
Simply the best tutorial for gnuplot. Many thanks.
very good introduction, speaker is super easy to understand even at 1.5, information is useful.
Just what I needed! Right to the point. Nice job! Thanks a lot.
This is rad! Thank you!! ... I can't imagine who would thumbs down this tutorial.
Good tutorial. Helped me get a quick graphical view of my C++ output saving me the hassle of rewriting the program in python and using the pyplot.
Great introduction to Gnuplot! u saved me a lot of time. Thanks
You're tutorial is extremely helpful! Thank you!!
Great introduction, thank you.
A few people are asking about the content of the .dat files. I suspect they are just plain text files with an X and Y value on each line, separated with a space.
Yes, it is a white space delimited text file. Here is a neat trick to generate 1000 pts of sample sine wave data on OSX or Linux terminal using 'yes', 'head', and 'awk' (the $ is the terminal prompt so don't include it):
$ yes ' ' | head -n 1000 | awk '{print c++, sin(c)}'
awk is very powerful and I strongly recommend it to anyone that wants to be a power user!
This is very very helpful. Thank you.
I LOVE you. you saved my life
Sir, great video. Thanks a lot. For OSX users, If you have troubles in the installation the better way its install: "Homebrew. The missing package manager for OS X". Google for that. Then type in a terminal: brew install gnuplot --wx. And thats it, that works in my case. Just one doubt, Whats the name of your font in the terminal? :)
nice tutorial everr, make me clear all of points
Just what I was looking for
The tutorial is really helpful..
try resetting your terminal...
set term wxt
or whatever terminal type you prefer.
Nice intro. i am having 5.2.2 and my terminal list shows all types but not enhanced or wxt, sorry but i am learning that's how i have asked
Hello!
thanks for the wonderful tutorial.
I have data in this formate
apple 1
bananna 3
ornage 5
fig 4
I want the x axis data to appear in the plot and not in the axis as such. Moreover they are words and not numbers.
How can I do it please?
It is a good idea when you change something instead of plotting the data again by repeating the 'plot' command to write 'replot'
Any postscript viewer will work. In OSX you can just you Preview. On linux you can use evince or any of the many other viewers. In Windows the only answer I know of is ghostview but I don't use windows much.
Thank youuuu :)
best gnuplot video!!!
thank you......it is very helpful..........
Thank you! It is very helpful!!
Great job. thanks!
Super useful! Thank you
I found it helpful :). Thank you.
Hello.. It is quite a useful video.. But somehow i am trying it is not printing the symbols... Please tell what should i do ?
thnx man, this has helped a lot
hello, i made using linspace vector x and now i would like to draw graph for function y=(x-1)/(x+1).
to be concrete:
x=linspace(0.5,2,50)
y=(x.-1)/(x.+1)
plot (x,y)
but it fails in function y and write error something like: undefined near line column
where i am making mistake?
Why do you have to smash the enter key at the end of each line?
Yeah nice work :)
that was well done and very helpful, thank you!
very useful
Hello, it is a good tutorial, I have a question: How can i create a .dat file on mac?
A .dat file is just an ascii (text) file. You can use any text editor.
Thank you, it was really helpfull
thanks.
my graph used to pop up after i load it in gnuplot. now it doesn't. i tried 'gnuplot file.gp -' and also inluding 'pause -1' in the file.gp. neither works.
any thoughts?
it would help if you showed how to install it
sudo dnf install gnuplot
@@DuncanCorps That didn't work for me, but this,
sudo apt-get install gnuplot
I seems to have the simplest problem can't solve. I typed in plot "data" and couldn't plot it. they say the file is unreadable, but I have a file named data and have data on it. Don't know what's wrong with it.
thanks .. really helped
Tahnks a lot man.
what did u use to open the eps file?
except for the 'gnoo'-plot, awesome!
thank you
thank you :)
thank you.
how do you install gnuplot on a mac?
Hi I don't have wxt terminal, how can I install it?
how can I display example.eps?
Use an eps or postscript viewer. Google "postscript viewer"
Please... how I install GNUPLOT 4.6.6 in iOS 10.9.5 ?? Help me... thanks!
1. Install a pkg manager for osx...
I prefer homebrew - brew.sh/
macPorts is an alternative - macports.org/install.php
2. Dwonload gnuplot - gnuplot.info/
3. install gnuplot via terminal using the command - *brew install gnuplot*
Note: if you installed MacPorts then you'll need - *port install gnuplot*
Also if you do not have xquartz installed you may want to do that first
I can't open .dat file, in which directory should it be stored for gnuplot to open it or how can I give the location of that file to gnuplot? help please :(
it seems I was giving directory in a wrong way, I have solved this problem
+Kakhi Kiknadze where to store .dat file? Please help...
+Kakhi Kiknadze use "pwd" to see where you are, and then "cd" to go to the file of your choice.
Example:
gnuplot > pwd
_____(shows where you are)
gnuplot > cd 'Desktop' (this goes to the desktop)
Using this you can navigate to the folder where you data file is.
Qasim Mahmood I have solved this problem, thank you anyway
where to store .dat file? Please help...
+Satyajit Dhawale you store the .dat file anywhere you want. What you need to do though is you need to open gnuplot while you are in within that file in terminal.
eg. if your .dat file is under Documents, you go INTO that Documents file, and open Gnuplot there.
how you have opened this eps file
If you are in Linux then:
xdg-open
I keep aliases in my `.bash_aliases` for "open" WSL: alias open='explorer.exe ' and Linux: alias open='xdg-open '.
gnuplot dot info
Why can't I just enter the function?
Not sure what the context of your question is. If you explain what you want to do I can give you a hand.
Why not just enter something like:
2x+7 and it shows me the grafic?
One can certainly do that with gnuplot.
+volarecantare type in 'plot 2x + 7' and it will do it for you
luke.gear
Thanks. Does it work without X, too?
Or is there an Xless variant of gnuplot?
Sorry...? "Think Linux" and using a Mac...?
So this is basically Matlab using command line. lol
Helvetica sucks...