-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Bindings to Matplotlib; a Python plotting library
--
-- Matplotlib is probably the most full featured plotting library out
-- there. These bindings provide a quick, easy, and extensible way to use
-- it in Haskell.
--
--
--
-- onscreen $ contourF (\a b -> sin (degreesRadians a) + cos (degreesRadians b)) (-100) 100 (-200) 200 10
--
@package matplotlib
@version 0.4.1
-- | Internal representations of the Matplotlib data. These are not
-- API-stable and may change. You can easily extend the provided bindings
-- without relying on the internals exposed here but they are provided
-- just in case.
module Graphics.Matplotlib.Internal
-- | A handy miscellaneous function to linearly map over a range of numbers
-- in a given number of steps
mapLinear :: (Double -> b) -> Double -> Double -> Double -> [b]
-- | The wrapper type for a matplotlib computation.
data Matplotlib
Matplotlib :: Seq MplotCommand -> Maybe ([Option] -> MplotCommand) -> Seq MplotCommand -> Matplotlib
-- | Resolved computations that have been transformed to commands
[mpCommands] :: Matplotlib -> Seq MplotCommand
-- | A pending computation that is affected by applied options
[mpPendingOption] :: Matplotlib -> Maybe ([Option] -> MplotCommand)
-- | Computations that follow the one that is pending
[mpRest] :: Matplotlib -> Seq MplotCommand
-- | A maplotlib command, right now we have a very shallow embedding
-- essentially dealing in strings containing python code as well as the
-- ability to load data. The loaded data should be a json object.
data MplotCommand
LoadData :: ByteString -> MplotCommand
LoadImage :: x -> MplotCommand
Exec :: String -> MplotCommand
[es] :: MplotCommand -> String
-- | Throughout the API we need to accept options in order to expose
-- matplotlib's many configuration options.
data Option
-- | results in a=b
K :: String -> String -> Option
-- | just inserts the option verbatim as an argument at the end of the
-- function
P :: String -> Option
-- | Convert an MplotCommand to python code, doesn't do much right
-- now
toPy :: MplotCommand -> String
-- | Resolve the pending command with no options provided.
resolvePending :: Matplotlib -> Matplotlib
-- | The io action is given a list of python commands to execute (note that
-- these are commands in the sense of lines of python code; each
-- inidivudal line may not be parseable on its own
withMplot :: Matplotlib -> ([String] -> IO a) -> IO a
-- | Create a plot that executes the string as python code
mplotString :: String -> Matplotlib
-- | Create an empty plot. This the beginning of most plotting commands.
mp :: Matplotlib
-- | Load the given data into the python "data" array
readData :: ToJSON a => a -> Matplotlib
-- | Load the given image into python "img" variable
readImage :: MplotImage i => i -> Matplotlib
-- | Combine two matplotlib commands
(%) :: Matplotlib -> Matplotlib -> Matplotlib
infixl 5 %
-- | Add Python code to the last matplotlib command
(#) :: (MplotValue val) => Matplotlib -> val -> Matplotlib
infixl 6 #
-- | A string to be rendered in python as a string. In other words it is
-- rendered as str.
data S
S :: String -> S
-- | A string to be rendered in python as a raw string. In other words it
-- is rendered as rstr.
data R
R :: String -> R
-- | A string to be rendered in python as a raw literal/code. In other
-- words it is inserted directly as is into the code.
data L
L :: String -> L
-- | Values which can be combined together to form a matplotlib command.
-- These specify how values are rendered in Python code.
class MplotValue val where toPythonOpt = toPython
-- | Render a value inline in Python code
toPython :: MplotValue val => val -> String
-- | Render a value as an optional parameter in Python code
toPythonOpt :: MplotValue val => val -> String
-- | The class of Haskell images or references to imagese which can be
-- transferred to matplotlib.
class MplotImage a
saveHaskellImage :: MplotImage a => a -> FilePath -> IO String
loadPythonImage :: MplotImage a => a -> String -> FilePath -> String
-- | An image that is a string is a file path.
-- | Add an option to the last matplotlib command. Commands can have only
-- one option! optFn :: Matplotlib -> Matplotlib
optFn :: ([Option] -> String) -> Matplotlib -> Matplotlib
-- | Merge two commands with options between
options :: Matplotlib -> Matplotlib
-- | A combinator like # that also inserts an option
(##) :: MplotValue val => Matplotlib -> val -> Matplotlib
infixl 6 ##
-- | An internal helper to convert a list of options to the python code
-- that applies those options in a call.
renderOptions :: [Option] -> [Char]
-- | An internal helper that modifies the options of a plot.
optionFn :: ([Option] -> [Option]) -> Matplotlib -> Matplotlib
-- | Apply a list of options to a plot resolving any pending options.
option :: Matplotlib -> [Option] -> Matplotlib
-- | A combinator for option that applies a list of options to a
-- plot
(@@) :: Matplotlib -> [Option] -> Matplotlib
infixl 6 @@
-- | Bind a list of default options to a plot. Positional options are kept
-- in order and default that way as well. Keyword arguments are
def :: Matplotlib -> [Option] -> Matplotlib
-- | Merge two sets of options
defFn :: [Option] -> [Option] -> [Option]
-- | Run python given a code string.
python :: Foldable t => t String -> IO (Either String String)
pyBackend :: [Char] -> [Char]
-- | The standard python includes of every plot
pyIncludes :: String -> [[Char]]
-- | The python command that reads external data into the python data array
pyReadData :: [Char] -> [[Char]]
-- | The python command that reads an image into the img variable
pyReadImage :: [Char] -> [[Char]]
-- | Detach python so we don't block (TODO This isn't working reliably)
pyDetach :: [[Char]]
-- | Python code to show a plot
pyOnscreen :: [[Char]]
-- | Python code that saves a figure
pyFigure :: [Char] -> [[Char]]
-- | Create a positional option
o1 :: MplotValue val => val -> Option
-- | Create a keyword option
o2 :: MplotValue val => String -> val -> Option
-- | Create a string that will be rendered as a python string
str :: String -> S
-- | Create a string that will be rendered as a raw python string
raw :: String -> R
-- | Create a literal that will inserted into the python code directly
lit :: String -> L
-- | Update axes. Should be called any time the state is changed.
updateAxes :: Matplotlib
-- | Update the figure and the axes. Should be called any time the state is
-- changed.
updateFigure :: Matplotlib
-- | Smallest element of a list of lists
minimum2 :: (Ord (t a), Ord a, Foldable t1, Foldable t) => t1 (t a) -> a
-- | Largest element of a list of lists
maximum2 :: (Ord (t a), Ord a, Foldable t1, Foldable t) => t1 (t a) -> a
instance GHC.Classes.Ord Graphics.Matplotlib.Internal.L
instance GHC.Classes.Eq Graphics.Matplotlib.Internal.L
instance GHC.Show.Show Graphics.Matplotlib.Internal.L
instance GHC.Classes.Ord Graphics.Matplotlib.Internal.R
instance GHC.Classes.Eq Graphics.Matplotlib.Internal.R
instance GHC.Show.Show Graphics.Matplotlib.Internal.R
instance GHC.Classes.Ord Graphics.Matplotlib.Internal.S
instance GHC.Classes.Eq Graphics.Matplotlib.Internal.S
instance GHC.Show.Show Graphics.Matplotlib.Internal.S
instance GHC.Classes.Ord Graphics.Matplotlib.Internal.Option
instance GHC.Classes.Eq Graphics.Matplotlib.Internal.Option
instance GHC.Show.Show Graphics.Matplotlib.Internal.Option
instance Graphics.Matplotlib.Internal.MplotValue Graphics.Matplotlib.Internal.S
instance Graphics.Matplotlib.Internal.MplotValue Graphics.Matplotlib.Internal.R
instance Graphics.Matplotlib.Internal.MplotValue Graphics.Matplotlib.Internal.L
instance Graphics.Matplotlib.Internal.MplotValue GHC.Base.String
instance Graphics.Matplotlib.Internal.MplotValue [GHC.Base.String]
instance Graphics.Matplotlib.Internal.MplotValue GHC.Types.Double
instance Graphics.Matplotlib.Internal.MplotValue [GHC.Types.Double]
instance Graphics.Matplotlib.Internal.MplotValue GHC.Integer.Type.Integer
instance Graphics.Matplotlib.Internal.MplotValue [GHC.Integer.Type.Integer]
instance Graphics.Matplotlib.Internal.MplotValue GHC.Types.Int
instance Graphics.Matplotlib.Internal.MplotValue [GHC.Types.Int]
instance Graphics.Matplotlib.Internal.MplotValue [Graphics.Matplotlib.Internal.R]
instance Graphics.Matplotlib.Internal.MplotValue [Graphics.Matplotlib.Internal.S]
instance Graphics.Matplotlib.Internal.MplotValue [Graphics.Matplotlib.Internal.L]
instance Graphics.Matplotlib.Internal.MplotValue GHC.Types.Bool
instance Graphics.Matplotlib.Internal.MplotValue x => Graphics.Matplotlib.Internal.MplotValue (x, x)
instance Graphics.Matplotlib.Internal.MplotValue (x, y) => Graphics.Matplotlib.Internal.MplotValue [(x, y)]
instance Graphics.Matplotlib.Internal.MplotValue x => Graphics.Matplotlib.Internal.MplotValue (GHC.Base.Maybe x)
instance Graphics.Matplotlib.Internal.MplotValue [[GHC.Types.Double]]
instance Graphics.Matplotlib.Internal.MplotImage GHC.Base.String
instance Data.Aeson.Types.ToJSON.ToJSON a => Graphics.Matplotlib.Internal.MplotImage [[a]]
-- | Matplotlib bindings and an interface to easily bind to new portions of
-- the API. The most essential parts of Matplotlib are wrapped and
-- exposed to Haskell through an interface that allows extenisbility.
-- Code is generated on the fly and python is called.
--
-- This is not a very Haskell-ish library. Type safety is non-existent,
-- it's easy to generate incorrect Python code, in exchange for being
-- able to bind to arbitrary matplotlib APIs with ease, so it's also easy
-- to generate correct python code.
--
-- The generated code follows a few simple conventions. data is always
-- loaded into a data variable that is a python array. Data is
-- transffered via json. This data variable is indexed by various
-- rendering commands.
--
-- Functions which start with the word data operate on the data array,
-- arguments are python code that should access that array. Most other
-- functions take haskell objects and load them into python.
--
-- This module should expose enough tools so that you can bind any part
-- of the matplotlib API. A binding with options, such as that of
-- plot, looks like:
--
--
-- readData (x, y)
-- % mp # "p = plot.plot(data[" # a # "], data[" # b # "]" ## ")"
-- % mp # "plot.xlabel(" # str label # ")"
--
--
-- Where important functions are:
--
--
-- - readData Load the given data into the
-- python data array by serializing it to JSON.
-- - % Sequence two plots
-- - mp Create an empty plot
-- - # Append python code to the last command in
-- a plot
-- - ## Just like # but also adds in a
-- placeholder for an options list
--
--
-- You can call this plot with
--
--
-- plot [1,2,3,4,5,6] [1,3,2,5,2] @@ [o1 "go-", o2 "linewidth" 2]
--
--
-- where @@ applies an options list replacing the last ##
--
--
-- - o1 A single positional option. The value is
-- rendered into python as the appropriate datatype. Strings become
-- python strings, bools become bools, etc. If you want to insert code
-- verbatim into an option use lit. If you want to have a raw
-- string with no escapes use raw.
-- - o2 A keyword option. The key is awlays a
-- string, the value is treated the same way that the option in o1
-- is treated.
--
--
-- Right now there's no easy way to bind to an option other than the last
-- one unless you want to pass options in as parameters.
--
-- The generated Python code should follow some invariants. It must
-- maintain the current figure in "fig", all available axes in "axes",
-- and the current axis in "ax". Plotting commands should use the current
-- axis, never the plot itself; the two APIs are almost identical. When
-- creating low-level bindings one must remember to call "plot.sci" to
-- set the current image when plotting a graph. The current spine of the
-- axes that's being manipulated is in "spine". The current quiver is in
-- "q"
module Graphics.Matplotlib
-- | Show a plot, blocks until the figure is closed
onscreen :: Matplotlib -> IO (Either String String)
-- | Print the python code that would be executed
code :: Matplotlib -> IO String
-- | Save to a file
file :: [Char] -> Matplotlib -> IO (Either String String)
-- | Plot the cross-correlation and autocorrelation of several variables.
-- TODO Due to a limitation in the options mechanism this takes explicit
-- options.
xacorr :: (ToJSON t, ToJSON a) => a -> t -> [Option] -> Matplotlib
-- | Plot a histogram for the given values with bins
histogram :: (MplotValue val, ToJSON t) => t -> val -> Matplotlib
-- | Plot a 2D histogram for the given values with bins
histogram2D :: ToJSON t => t -> t -> Matplotlib
-- | Plot the given values as a scatter plot
scatter :: (ToJSON t1, ToJSON t) => t1 -> t -> Matplotlib
-- | Create a bar at a position with a height
bar :: (ToJSON t1, ToJSON t) => t1 -> t -> Matplotlib
-- | Plot a line
line :: (ToJSON t1, ToJSON t) => t1 -> t -> Matplotlib
-- | Like plot but takes an error bar value per point errorbar ::
-- (ToJSON x, ToJSON y, ToJSON xs, ToJSON ys) => x -> y -> Maybe
-- xs -> Maybe ys -> Matplotlib
errorbar :: (ToJSON t, ToJSON t1, ToJSON t2, ToJSON t3) => t3 -> t2 -> t1 -> t -> Matplotlib
-- | Plot a line given a function that will be executed for each element of
-- given list. The list provides the x values, the function the y values.
lineF :: (ToJSON a, ToJSON b) => (a -> b) -> [a] -> Matplotlib
-- | Create a box plot for the given data
boxplot :: ToJSON a => a -> Matplotlib
-- | Create a violin plot for the given data
violinplot :: ToJSON a => a -> Matplotlib
-- | Given a grid of x and y values and a number of steps call the given
-- function and plot the 3D contour
contourF :: (ToJSON val, MplotValue val, Ord val) => (Double -> Double -> val) -> Double -> Double -> Double -> Double -> Double -> Matplotlib
-- | Given a grid of x and y values and a number of steps call the given
-- function and plot the 3D projection
projectionsF :: (ToJSON val, MplotValue val, Ord val) => (Double -> Double -> val) -> Double -> Double -> Double -> Double -> Double -> Matplotlib
-- | Plot x against y interpolating with n steps
plotInterpolated :: (MplotValue val, ToJSON t, ToJSON t1) => t1 -> t -> val -> Matplotlib
-- | A handy function to plot a line between two points give a function and
-- a number o steps
plotMapLinear :: ToJSON b => (Double -> b) -> Double -> Double -> Double -> Matplotlib
-- | Plot a line between 0 and the length of the array with the given y
-- values
line1 :: (Foldable t, ToJSON (t a)) => t a -> Matplotlib
-- | Plot a matrix
matShow :: ToJSON a => a -> Matplotlib
-- | Plot an image
imshow :: MplotImage a => a -> Matplotlib
-- | Plot a matrix
pcolor :: ToJSON a => a -> Matplotlib
-- | Plot a matrix
pcolor3 :: (ToJSON t, ToJSON t1, ToJSON t2) => t2 -> t1 -> t -> Matplotlib
-- | Create a non-uniform image from samples
nonUniformImage :: (ToJSON t, ToJSON t1, ToJSON t2) => t2 -> t1 -> t -> Matplotlib
-- | Create a pie chart
pie :: (MplotValue val, ToJSON val) => val -> Matplotlib
-- | Plot a KDE of the given functions; a good bandwith will be chosen
-- automatically
density :: [Double] -> Maybe (Double, Double) -> Matplotlib
-- | Set an rc parameter
rc :: String -> Matplotlib
-- | Set an rcParams key-value
setParameter :: MplotValue val => String -> val -> Matplotlib
-- | Enable or disable TeX
setTeX :: Bool -> Matplotlib
-- | Enable or disable unicode
setUnicode :: Bool -> Matplotlib
-- | Plot the a and b entries of the data object
dataPlot :: (MplotValue val, MplotValue val1) => val1 -> val -> Matplotlib
-- | Plot the Haskell objects x and y as a line
plot :: (ToJSON t, ToJSON t1) => t1 -> t -> Matplotlib
streamplot :: (ToJSON t, ToJSON t1, ToJSON t2, ToJSON t3) => t3 -> t2 -> t1 -> t -> Matplotlib
-- | Plot x against y where x is a date. xunit is something like
-- weeks, yearStart, monthStart, dayStart are an offset to x.
-- TODO This isn't general enough; it's missing some settings about the
-- format. The call is also a mess.
dateLine :: (ToJSON t1, ToJSON t2) => t1 -> t2 -> String -> (Int, Int, Int) -> Matplotlib
-- | Create a histogram for the a entry of the data array
dataHistogram :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
-- | Create a scatter plot accessing the given fields of the data array
dataScatter :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
-- | Create a line accessing the given entires of the data array
dataLine :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
-- | Create a 3D contour
contour :: (Foldable t, Foldable t1, Foldable t2, Foldable t3, Foldable t4, Foldable t5, Ord (t val), Ord (t2 val1), Ord (t4 val2), Ord val, Ord val1, Ord val2, MplotValue val, MplotValue val2, MplotValue val1, ToJSON (t1 (t val)), ToJSON (t3 (t2 val1)), ToJSON (t5 (t4 val2))) => t5 (t4 val2) -> t3 (t2 val1) -> t1 (t val) -> Matplotlib
-- | Create a 3D projection
projections :: (Foldable t, Foldable t1, Foldable t2, Foldable t3, Foldable t4, Foldable t5, Ord (t val), Ord (t2 val1), Ord (t4 val2), Ord val, Ord val1, Ord val2, MplotValue val, MplotValue val2, MplotValue val1, ToJSON (t1 (t val)), ToJSON (t3 (t2 val1)), ToJSON (t5 (t4 val2))) => t5 (t4 val2) -> t3 (t2 val1) -> t1 (t val) -> Matplotlib
-- | Plot a 3D wireframe accessing the given elements of the data array
wireframe :: (MplotValue val2, MplotValue val1, MplotValue val) => val2 -> val1 -> val -> Matplotlib
-- | Plot a 3D surface accessing the given elements of the data array
surface :: (MplotValue val2, MplotValue val1, MplotValue val) => val2 -> val1 -> val -> Matplotlib
-- | Plot a contour accessing the given elements of the data array
contourRaw :: (MplotValue val1, MplotValue val2, MplotValue val5, MplotValue val4, MplotValue val3, MplotValue val) => val5 -> val4 -> val3 -> val2 -> val1 -> val -> Matplotlib
-- | Draw a bag graph in a subplot TODO Why do we need this?
subplotDataBar :: (MplotValue val, MplotValue val2, MplotValue val1) => val2 -> val1 -> val -> [Option] -> Matplotlib
-- | The default bar with
barDefaultWidth :: (Integral a1, Fractional a) => a1 -> a
-- | Create a set of labelled bars of a given height
subplotBarsLabelled :: (MplotValue val, Foldable t, ToJSON (t a)) => [t a] -> val -> [[Option]] -> Matplotlib
-- | Create a subplot and a set of labelled bars TODO This is a mess..
subplotBars :: ToJSON a => [a] -> [[Option]] -> Matplotlib
-- | Update the data array to linearly interpolate between array entries
interpolate :: (MplotValue val, MplotValue val2, MplotValue val1) => val2 -> val1 -> val -> Matplotlib
-- | Plot a KDE of the given functions with an optional start/end and a
-- bandwidth h
densityBandwidth :: [Double] -> Double -> Maybe (Double, Double) -> Matplotlib
-- | Plot cross-correlation
xcorr :: (ToJSON t, ToJSON t1) => t1 -> t -> Matplotlib
-- | Plot auto-correlation
acorr :: ToJSON a => a -> Matplotlib
-- | A quiver plot; color is optional and can be nothing
quiver :: (ToJSON t, ToJSON t1, ToJSON t2, ToJSON t3, ToJSON t4) => t4 -> t3 -> t2 -> t1 -> Maybe t -> Matplotlib
-- | A key of a given size with a label for a quiver plot
quiverKey :: (MplotValue val3, MplotValue val2, MplotValue val1, MplotValue val) => val3 -> val2 -> val1 -> val -> Matplotlib
-- | Plot text at a specified location
text :: (MplotValue val1, MplotValue val) => val1 -> val -> String -> Matplotlib
-- | Add a text to a figure instead of a particular plot
figText :: (MplotValue val1, MplotValue val) => val1 -> val -> String -> Matplotlib
-- | Add an annotation
annotate :: String -> Matplotlib
-- | Square up the aspect ratio of a plot.
setAspect :: Matplotlib
-- | Square up the aspect ratio of a plot.
squareAxes :: Matplotlib
-- | Set the rotation of the labels on the x axis to the given number of
-- degrees
roateAxesLabels :: MplotValue val => val -> Matplotlib
-- | Set the x labels to be vertical
verticalAxes :: Matplotlib
-- | Set the x scale to be logarithmic
logX :: Matplotlib
-- | Set the y scale to be logarithmic
logY :: Matplotlib
-- | Set limits on the x axis
xlim :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
-- | Set limits on the y axis
ylim :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
-- | Add a horizontal line across the axis
axhline :: MplotValue val => val -> Matplotlib
-- | Insert a legend
legend :: Matplotlib
-- | Insert a color bar TODO This refers to the plot and not an axis. Might
-- cause trouble with subplots
colorbar :: Matplotlib
-- | Add a title
title :: String -> Matplotlib
-- | Show/hide grid lines
grid :: Bool -> Matplotlib
-- | Enable 3D projection
axis3DProjection :: Matplotlib
-- | Label and set limits of a set of 3D axis TODO This is a mess, does
-- both more and less than it claims.
axis3DLabels :: (Foldable t, Foldable t1, Foldable t2, Foldable t3, Foldable t4, Foldable t5, Ord (t val), Ord (t2 val1), Ord (t4 val2), Ord val, Ord val1, Ord val2, MplotValue val, MplotValue val1, MplotValue val2) => t5 (t4 val2) -> t3 (t2 val1) -> t1 (t val) -> Matplotlib
-- | Add a label to the x axis
xlabel :: String -> Matplotlib
-- | Add a label to the y axis
ylabel :: String -> Matplotlib
-- | Add a label to the z axis
zlabel :: String -> Matplotlib
setSizeInches :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
tightLayout :: Matplotlib
xkcd :: Matplotlib
xticks :: MplotValue val => val -> Matplotlib
yticks :: MplotValue val => val -> Matplotlib
zticks :: MplotValue val => val -> Matplotlib
xtickLabels :: MplotValue val => val -> Matplotlib
ytickLabels :: MplotValue val => val -> Matplotlib
ztickLabels :: MplotValue val => val -> Matplotlib
-- | Set the spacing of ticks on the x axis
axisXTickSpacing :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
-- | Set the labels on the x axis
axisXTickLabels :: MplotValue val => val -> Matplotlib
-- | Set the spacing of ticks on the y axis
axisYTickSpacing :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
-- | Set the labels on the y axis
axisYTickLabels :: MplotValue val => val -> Matplotlib
axisXTicksPosition :: MplotValue val => val -> Matplotlib
axisYTicksPosition :: MplotValue val => val -> Matplotlib
spine :: MplotValue val => val -> Matplotlib
spineSetBounds :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
spineSetVisible :: MplotValue val => val -> Matplotlib
spineSetPosition :: (MplotValue val1, MplotValue val) => val1 -> val -> Matplotlib
setAx :: Matplotlib
-- | Create a subplot with the coordinates (r,c,f)
addSubplot :: (MplotValue val2, MplotValue val1, MplotValue val) => val2 -> val1 -> val -> Matplotlib
-- | Access a subplot with the coordinates (r,c,f)
getSubplot :: (MplotValue val2, MplotValue val1, MplotValue val) => val2 -> val1 -> val -> Matplotlib
-- | Creates subplots and stores them in an internal variable
subplots :: Matplotlib
-- | Access a subplot
setSubplot :: MplotValue val => val -> Matplotlib
-- | Add axes to a plot
axes :: Matplotlib
-- | Add axes to a figure
addAxes :: Matplotlib
-- | Creates a new figure with the given id. If the Id is already in use it
-- switches to that figure.
figure :: Matplotlib
-- | The wrapper type for a matplotlib computation.
data Matplotlib
-- | Throughout the API we need to accept options in order to expose
-- matplotlib's many configuration options.
data Option
-- | A combinator for option that applies a list of options to a
-- plot
(@@) :: Matplotlib -> [Option] -> Matplotlib
infixl 6 @@
-- | Combine two matplotlib commands
(%) :: Matplotlib -> Matplotlib -> Matplotlib
infixl 5 %
-- | Create a positional option
o1 :: MplotValue val => val -> Option
-- | Create a keyword option
o2 :: MplotValue val => String -> val -> Option
-- | A combinator like # that also inserts an option
(##) :: MplotValue val => Matplotlib -> val -> Matplotlib
infixl 6 ##
-- | Add Python code to the last matplotlib command
(#) :: (MplotValue val) => Matplotlib -> val -> Matplotlib
infixl 6 #
-- | Create an empty plot. This the beginning of most plotting commands.
mp :: Matplotlib
-- | Bind a list of default options to a plot. Positional options are kept
-- in order and default that way as well. Keyword arguments are
def :: Matplotlib -> [Option] -> Matplotlib
-- | Load the given data into the python "data" array
readData :: ToJSON a => a -> Matplotlib
-- | Load the given image into python "img" variable
readImage :: MplotImage i => i -> Matplotlib
-- | Create a string that will be rendered as a python string
str :: String -> S
-- | Create a string that will be rendered as a raw python string
raw :: String -> R
-- | Create a literal that will inserted into the python code directly
lit :: String -> L
-- | Update axes. Should be called any time the state is changed.
updateAxes :: Matplotlib
-- | Update the figure and the axes. Should be called any time the state is
-- changed.
updateFigure :: Matplotlib
-- | A handy miscellaneous function to linearly map over a range of numbers
-- in a given number of steps
mapLinear :: (Double -> b) -> Double -> Double -> Double -> [b]