LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > Bits and Pixels
User Name
Password

Notices

Concerning free software, programming, and whatever else I find interesting. Also the blog for my Web site, frigidcode.com.
Rate this Entry

More fun with Haskell plotting: Functions of functions

Posted 04-08-2013 at 01:56 AM by hydraMax

Code:
import Graphics.Gnuplot.Simple
f x a = (x + a) * (x - a) * (x + 2*a)
fs f l = map f [1..l]
main = plotFuncs
         [Key Nothing, Title "(x + a)(x - a)(x + 2a) for a over 1..10"]
         (linearScale 1000 (-10,10))
         (fs f (10 :: Double))
See attached graph.
Attached Images
File Type: png (x+a)(x-a)(x+2a).png (83.9 KB, 4 views)
Posted in Uncategorized
Views 353 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



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

Main Menu
Advertisement

Advertisement
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