0

I would like to get started with gnuplot in Ubuntu. I have successfully installed the software but I get an error message when I try to plot the sine function. I don't know how to solve this problem and then obtain a plot of my sine function.

turbulence@turbulence-LIFEBOOK-AH531:~$ gnuplot> plot sin(x)
bash: syntax error near unexpected token `('

1 Answer 1

1

You have to launch gnuplot first (type gnuplot and press enter), and then when you're in give the command (in your case plot sin(x)). This is what you should see on the terminal:

~$ gnuplot

G 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 'wxt'
gnuplot> plot sin(x)
Sign up to request clarification or add additional context in comments.

5 Comments

Thank you albus_c for your answer! It works very well!
Hey! What one should do in order to return to the terminal? Thank you! a
it's very simple: just type "exit"
You're welcome. Besides Google, you can see most of gnuplot's commands by typing help once you're in gnuplot.
Great! the world of gnuplot is indeed a better place to be!! a

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.