user3261475
user3261475

Reputation:

Getting started with gnuplot in Ubuntu environment

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 `('

Upvotes: 0

Views: 906

Answers (1)

albusdemens
albusdemens

Reputation: 6624

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)

Upvotes: 1

Related Questions