LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 03-22-2007, 04:48 AM   #1
titanium_geek
Senior Member
 
Registered: May 2002
Location: Melbourne Australia
Distribution: it died/ macosx
Posts: 2,478

Rep: Reputation: 50
gnuplot for dummies: sin(x) is nice, but...


Hi there. My problem is that I can't figure out how to use gnuplot very basically, and I can't seem to find such info in the tutorials.

What I want to know:
* plotting a line.
* plotting a plane (I know about splot)

I know the basic syntax is plot "something" for example, plot sin(x) . Sine looks pretty, but how do I get a regular boring line, of y=mx+b form? And a regular boring 3d plane.

Thanks.

titanium_geek
 
Old 03-23-2007, 09:59 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,676
Blog Entries: 1

Rep: Reputation: 204Reputation: 204Reputation: 204
The most direct way to plot a line is
Code:
m=2
b=3
plot(m*x+b)
Another way that would be better habit when you get into something more complex than a line
Code:
m=3
b=2
f(x)=m*x+b
plot f(x)
To plot a simple plane
Code:
splot x
Once again, the more palatable method would be
Code:
f(x)=x
splot f(x)

Last edited by weibullguy; 03-23-2007 at 10:08 AM.
 
Old 03-23-2007, 04:27 PM   #3
titanium_geek
Senior Member
 
Registered: May 2002
Location: Melbourne Australia
Distribution: it died/ macosx
Posts: 2,478

Original Poster
Rep: Reputation: 50
thanks- that's really useful!

Cheers.

titanium_geek
 
Old 04-10-2007, 05:00 AM   #4
titanium_geek
Senior Member
 
Registered: May 2002
Location: Melbourne Australia
Distribution: it died/ macosx
Posts: 2,478

Original Poster
Rep: Reputation: 50
argh. I'm getting hung up on two and three variable equations. Tips please?

titanium_geek
 
  


Reply

Tags
gnuplot, math


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc version 3.3.5 sin() cos() function problem knockout_artist Programming 5 12-28-2005 12:16 AM
SUSE Linux 9.3 for Dummies (For Dummies S.) samuelmp Suse/Novell 11 08-01-2005 01:42 PM
Sin for Linux. The SIN Raven Linux - Games 11 01-05-2004 12:34 PM
Sin for Linux The SIN Raven Linux - Games 0 12-18-2003 11:06 AM
why would sin(0). return nan? greenmuzz Programming 2 10-23-2003 06:03 AM


All times are GMT -5. The time now is 08:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration