-- 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. Type-safety is largely non-existent and sacrificed for
-- maximum extensibility.
@package matplotlib
@version 0.1.2.1
module Graphics.Matplotlib
-- | A handle internal function
mapLinear :: (Double -> b) -> Double -> Double -> Double -> [b]
-- | The wrapper type for a matplotlib computation. This is opaque.
data Matplotlib
Matplotlib :: [MplotCommand] -> Matplotlib
-- | A maplotlib command, right now we have a very shallow embedding
-- essentially dealing in opaque strings containing python code as well
-- as the ability to load data. The loaded should be a json object.
data MplotCommand
LoadData :: ByteString -> MplotCommand
Exec :: String -> MplotCommand
-- | 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
B :: String -> Option
-- | Convert an MplotCommand to python code, doesn't do much right
-- now
toPy :: MplotCommand -> String
-- | 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
-- | Run python given a code string.
python :: Foldable t => t String -> IO (Either String String)
-- | The standard python includes of every plot
pyIncludes :: [[Char]]
-- | The python command that reads external data into the python data array
pyReadData :: [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]]
-- | 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 (Either a String)
-- | Save to a file
figure :: [Char] -> Matplotlib -> IO (Either String String)
-- | Create a plot that executes the string as python code
mplot :: String -> Matplotlib
-- | combine two matplotlib commands
(%) :: Matplotlib -> Matplotlib -> Matplotlib
infixl 5 %
-- | Values which can be combined together to form a matplotlib command.
-- Right now matplotlib commands are strings and this is just a helper to
-- construct them.
class MplotValue val
(#) :: MplotValue val => String -> val -> String
-- | Plot the a and b entries of the data object
dataPlot :: (MplotValue val, MplotValue val1) => val1 -> val -> [Option] -> Matplotlib
-- | Plot the Haskell objects x and y as a line
plot :: (ToJSON t, ToJSON t1) => t1 -> t -> [Option] -> Matplotlib
-- | Plot & show onscreen
showPlot :: (ToJSON t, ToJSON t1) => t1 -> t -> [Option] -> IO (Either String String)
-- | Load the given data into the 'data' array
readData :: ToJSON a => a -> Matplotlib
-- | An internal helper to convert a list of options to the python code
-- that applies those options in a call.
options :: [Option] -> String
-- | Combine a list of user options with a default; useful for options such
-- as line styles that require sane defaults but can be overriden.
def :: Option -> [Option] -> [Option]
-- | Show grid lines
gridLines :: 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
-- | Add a label to the x axis
xLabel :: MplotValue val => val -> Matplotlib
-- | Add a label to the y axis
yLabel :: MplotValue val => val -> Matplotlib
-- | Add a label to the z axis
zLabel :: MplotValue val => val -> Matplotlib
-- | Create a histogram for the a entry of the data array
dataHistogram :: (MplotValue val1, MplotValue val) => val1 -> val -> [Option] -> Matplotlib
-- | Plot a histogram for the given values with bins
histogram :: (MplotValue val, ToJSON t) => t -> val -> [Option] -> Matplotlib
-- | Plot & show the histogram
showHistogram :: (ToJSON t, MplotValue val) => t -> val -> [Option] -> IO (Either String String)
-- | Create a scatter plot accessing the given fields of the data array
dataScatter :: (MplotValue val1, MplotValue val) => val1 -> val -> [Option] -> Matplotlib
-- | Plot the given values as a scatter plot
scatter :: (ToJSON t1, ToJSON t) => t1 -> t -> [Option] -> Matplotlib
-- | Plot and show a scatter plot
showScatter :: (ToJSON t1, ToJSON t) => t1 -> t -> [Option] -> IO (Either String String)
-- | Create a line accessing the given entires of the data array
dataLine :: (MplotValue val1, MplotValue val) => val1 -> val -> [Option] -> Matplotlib
-- | Plot a line
line :: (ToJSON t1, ToJSON t) => t1 -> t -> [Option] -> 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] -> [Option] -> Matplotlib
-- | Plot and show a line
showLine :: (ToJSON t1, ToJSON t) => t1 -> t -> [Option] -> IO (Either String String)
-- | 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
-- | 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
-- | Enable 3D projection
axis3DProjection :: 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
-- | 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
-- | 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
-- | 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
-- | Create a subplot with the coordinates (r,c,f)
addSubplot :: (MplotValue val2, MplotValue val1, MplotValue val) => val2 -> val1 -> val -> [Option] -> Matplotlib
-- | Access a subplot with the coordinates (r,c,f)
mplotSubplot :: (MplotValue val2, MplotValue val1, MplotValue val) => 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
-- | Add a title
title :: MplotValue val => val -> [Option] -> Matplotlib
-- | Set the spacing of ticks on the x axis
axisXTickSpacing :: (MplotValue val1, MplotValue val) => val1 -> val -> [Option] -> Matplotlib
-- | Set the labels on the x axis
axisXTickLabels :: MplotValue val => val -> [Option] -> Matplotlib
-- | Update the data array to linearly interpolate between array entries
interpolate :: (MplotValue val, MplotValue val2, MplotValue val1) => val2 -> val1 -> val -> Matplotlib
-- | Plot x against y interpolating with n steps
plotInterpolated :: (MplotValue val, ToJSON t, ToJSON t1) => t1 -> t -> val -> [Option] -> 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
-- | 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 -> [Option] -> 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 -> [Option] -> Matplotlib
matShow :: ToJSON a => a -> [Option] -> 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 a KDE of the given functions; a good bandwith will be chosen
-- automatically
density :: [Double] -> Maybe (Double, Double) -> Matplotlib
instance GHC.Classes.Ord Graphics.Matplotlib.MplotCommand
instance GHC.Classes.Eq Graphics.Matplotlib.MplotCommand
instance GHC.Show.Show Graphics.Matplotlib.MplotCommand
instance Graphics.Matplotlib.MplotValue GHC.Base.String
instance Graphics.Matplotlib.MplotValue [GHC.Base.String]
instance Graphics.Matplotlib.MplotValue GHC.Types.Double
instance Graphics.Matplotlib.MplotValue GHC.Types.Int
instance Graphics.Matplotlib.MplotValue (GHC.Base.String, GHC.Base.String)
instance Graphics.Matplotlib.MplotValue x => Graphics.Matplotlib.MplotValue (x, x)
instance Graphics.Matplotlib.MplotValue (x, y) => Graphics.Matplotlib.MplotValue [(x, y)]
instance Graphics.Matplotlib.MplotValue Graphics.Matplotlib.Option
instance Graphics.Matplotlib.MplotValue [Graphics.Matplotlib.Option]