Gnuplot is simple to install and use on Ubuntu systems as the latest version is included in the Ubuntu repositories. One part that is not included by default is auto complete at the gnuplot command line. In order to install gnuplot and enable auto complete, simply open a terminal, and type the following command
sudo apt-get install gnuplot rlwrap
UPDATE On Ubuntu 12.04 and later you need to specify what version of gnuplot to install (qt or x11), so change the command above to
sudo apt-get install gnuplot-qt rlwrap
Then open your bash configuration file (if using the default bash shell)
gedit ~/.bashrc &
and add the following lines to the file somewhere near the bottom
# enable autocomplete in gnuplot
alias gnuplot="rlwrap -a -c -b\"\\\"\\\"\\\'\\\'\" gnuplot"
save the file and exit.
First we need some data for plotting, for instance the file
http://www.maths.manchester.ac.uk/~pjohnson/Gnuplot/testResults.dat
may be downloaded from my website.
Now open a new terminal and type gnuplot
into the command line. You should see the following:
Now enter the following:
p 'te
and press the tab key. The filename should auto complete. If it does not appear press the tab key again as there might be multiple files beginning `te', and you might need to enter more letters to allow it to complete. If it is still not working, enter !ls
and check that the file is present in your current working directory. Complete the gnuplot command to plot the file with lines and press return
p 'testResults.dat' w l
If it all works you should see:
Thanks it works
ReplyDeleteIf you just put the first letter of the file and then press the tab key it also works, including the dir before "./fichero" .
ReplyDeleteAnd this is without installing another editor...
Bonjour, j'ai un message d'erreur lors de la vérification du bon fonctionnement du logiciel :
ReplyDeleteG N U P L O T
Version 4.6 patchlevel 0 last modified 2012-03-04
Build System: Linux x86_64
Copyright (C) 1986-1993, 1998, 2004, 2007-2012
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type set to 'unknown'
gnuplot> p 'testResults.dat' wl
^
';' expected
pouvez-vous m'aider svp ? Merci.
hi there, scuse me
DeleteI have the same problem, did you solve it?
and how?
Hi Dritz,
ReplyDeleteYou need a space between the w and l. The 'p', 'w' and 'l' are short for 'plot' 'with' 'lines'. You may also write:
plot 'testResults.dat' with lines
Paul
can i follow same procedure for gnuplot-4.6.0 on ubantu 12.04??
ReplyDeleteJust updated this. You need to install gnuplot-qt now as there is no longer any default terminal.
ReplyDeleteWhich one is better gnuplot qt or x11 version for scientific computations plotting ??
ReplyDeleteThanks for sharing. Works great! Just one suggestion: for proper using of external programs within gnuplot, e.g. "! less someFile.dat" add the option "-N" or "--no-children" to the rlwrap call.
ReplyDeleteGracias! funciona perfecto!
ReplyDeletei did every thing, but no graph appear.
ReplyDeletewhat I should do?
Thanks
ReplyDeleteThanks a lot sir
ReplyDeletehow you plot the sloshing tank data in cfd Openfoam by using this gnuplot, help me please.
ReplyDeletehere my email address.
(jackly_muriban@yahoo.com)
thank you
I have run the 'testresults' in gnuplot and plotted successfully.
ReplyDeleteBut I could not able to save the plot in ubuntu 10.04.
Someone pls help me to save the plot.
i want to plot the graph by my own values plz help me
ReplyDeletethanks so much,. it works.
ReplyDeletewow great, thanks for share spss cronbach's alpha
ReplyDeleteYour post has the information that is helpful and very informative. In this article you have share a good research method ubuntu. I think this is a good research and helpful for every researcher, writer, reader. I would like you to keep up the good work. good site
ReplyDeletehow to get the values for plotting into gnuplot..pls let me know..because am new to this area
ReplyDeleteDifferent operating systems of the computer have different values and features. If you're working with the Ubuntu then you have to maintain all the knowledge about this. You have to enable different plugins with services of dissertation statistics service and make sure that the operating system running efficiently.
ReplyDeleteWonderful Post. Thanks
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThank you very much. This worked for me.
ReplyDeleteA septic system is an underground chamber made of field design for installs tank through which domestic wastewater flows for basic treatment. Services for sewerage systems of all shapes and sizes - For More Information Visit Here -- install tank
ReplyDeleteWow. It is such an amazing article. I am looking forward to reading more articles of yours in the future.. What American citizen need visa for Turkey ? Yes , of course all the American Citizens need a visa to visit . Because the USA is not included in the list of those countries which do not require a visa permit to visit Turkey.
ReplyDelete