Chart-simple-1.3.1: A wrapper for the chart library to assist with basic plots (Deprecated - use the Easy module instead)

Copyright(c) David Roundy 2007
LicenseBSD-style (see chart/COPYRIGHT)
Safe HaskellNone
LanguageHaskell98

Graphics.Rendering.Chart.Simple

Description

An even simpler framework for creating 2D charts in Haskell.

The basic idea is to make it as easy to plot as octave, which means that you provide no more information than you wish to provide. We provide four plotting functions, which differ only in their output. One produces a Layout1 that you can customize using other Graphics.Rendering.Chart functions. The other three produce their output directly. All three accept the same input and produce the same plots.

The plot functions accept a variable number of arguments. You must provide a [Double] which defines the points on the x axis, which must precede any of the "y" values. The y values may either be [Double] or functions. After any given y value, you can give either Strings or PlotKinds describing how you'd like that y printed.

Examples:

-- this plotters
import Graphics.Rendering.Chart.Simple
-- rendering instances from 'chart-cairo' package
import Graphics.Rendering.Chart.Backend.Cairo
main = do
    plotPDF "foo.pdf" [0 :: Double, 0.1..10] sin "- " cos ". " cos "o"
    plotPS "foo.ps" [0 :: Double, 0.1..10] (sin . exp) "- " (sin . exp) "o-"

Synopsis

Documentation

plot :: PlotType a => a Source

Deprecated: use Chart.Graphics.Rendering.Chart.Easy

The main plotting function. The idea behind PlotType is shamelessly copied from Text.Printf (and is not exported). All you need to know is that your arguments need to be in class PlotArg. And PlotArg consists of functions and [Double] and String and PlotKind or [PlotKind].

data PlotKind Source

Type to define a few simple properties of each plot.

plotPDF :: PlotPDFType a => String -> a Source

Deprecated: use Chart.Graphics.Rendering.Chart.Easy

Save a plot as a PDF file.

plotPS :: PlotPSType a => String -> a Source

Deprecated: use Chart.Graphics.Rendering.Chart.Easy

Save a plot as a postscript file.

plotPNG :: PlotPNGType a => String -> a Source

Deprecated: use Chart.Graphics.Rendering.Chart.Easy

Save a plot as a png file.

plotWindow :: PlotWindowType a => a Source

Deprecated: use Chart.Graphics.Rendering.Chart.Easy

Display a plot on the screen.

class PlotPDFType t where Source

Methods

pld :: FilePath -> [UPlot] -> t Source

Instances

PlotPDFType (IO a) 
(PlotArg a, PlotPDFType r) => PlotPDFType (a -> r) 

class PlotPSType t where Source

Methods

pls :: FilePath -> [UPlot] -> t Source

Instances

PlotPSType (IO a) 
(PlotArg a, PlotPSType r) => PlotPSType (a -> r) 

class PlotWindowType t where Source

Methods

plw :: [UPlot] -> t Source

Instances

uplot :: [UPlot] -> LayoutDDD Source

Deprecated: use Chart.Graphics.Rendering.Chart.Easy