Safe Haskell | None |
---|---|
Language | Haskell2010 |
Plotly Plots in Haskell
Synopsis
- plot :: FilePath -> Script -> IO ()
- scatter' :: [String] -> [[Double]] -> [[Double]] -> PlotConfig -> Script
- scatter :: [String] -> [Double] -> [[Double]] -> PlotConfig -> Script
- histogram :: [String] -> [[Double]] -> PlotConfig -> Script
- heatmap :: [String] -> [String] -> [[Double]] -> PlotConfig -> Script
- scatter3d :: [String] -> [[Double]] -> [[Double]] -> [[Double]] -> PlotConfig -> Script
- surface'' :: [String] -> [[[Double]]] -> PlotConfig -> Script
- surface' :: [String] -> [Double] -> [Double] -> [[[Double]]] -> PlotConfig -> Script
- surface :: [String] -> [[Double]] -> [[Double]] -> [[[Double]]] -> PlotConfig -> Script
- parcoord'' :: [String] -> [[[Double]]] -> PlotConfig -> Script
- parcoord' :: [Double] -> [String] -> [[[Double]]] -> PlotConfig -> Script
- parcoord :: [Double] -> [String] -> [[[Double]]] -> PlotConfig -> Script
- type Script = ByteString
- data Mode
- = Lines
- | Markers
- | LinesMarkers
- data Type
- data Layout = Layout {}
- data BarMode
- data AxisType
- = Linear
- | Log
- | Date
- | Category
- | MultiCategory
- data Color
- type ColorMap = [ColorMapping]
- data ColorScale
- data Symbol
- = Circle
- | CircleOpen
- | Cross
- | Diamond
- | DiamondOpen
- | Square
- | SquareOpen
- | X
- data Marker = Marker {}
- data Line = Line {
- showscale :: !(Maybe Bool)
- reversescale :: !(Maybe Bool)
- colorscale :: !(Maybe ColorScale)
- colormap :: !(Maybe ColorMap)
- color :: !(Maybe [Double])
- data XBins = XBins {}
- data Margin = Margin {}
- data PlotConfig = PlotConfig {}
- defaultConfig :: PlotConfig
Documentation
Save Plot to HTML File
:: [String] | Trace Names |
-> [[Double]] | xs |
-> [[Double]] | ys |
-> PlotConfig | Plot Config |
-> Script | Plotly Script |
Scatter Plot with individual x values per trace
:: [String] | Trace Names |
-> [Double] | xs |
-> [[Double]] | ys |
-> PlotConfig | Plot Config |
-> Script | Plotly Script |
Scatter Plot with same x axis for all ys
:: [String] | Trace Names |
-> [[Double]] | Traces |
-> PlotConfig | Plot Config |
-> Script | Plotly Script |
Histogram Plot
:: [String] | X Categories |
-> [String] | Y Categories |
-> [[Double]] | Data Matrix |
-> PlotConfig | Plot Config |
-> Script | Plotly Script |
Heatmap Plot
:: [String] | Trace Names |
-> [[Double]] | xs |
-> [[Double]] | ys |
-> [[Double]] | zs |
-> PlotConfig | Plot Config |
-> Script | Plotly Script |
3D Scatter Plot
:: [String] | Trace Names |
-> [[[Double]]] | zs |
-> PlotConfig | Plot Config |
-> Script | Ploty Script |
3D Surface Plot where X and Y are indices
:: [String] | Trace Names |
-> [Double] | xs |
-> [Double] | |
-> [[[Double]]] | zs |
-> PlotConfig | Plot Config |
-> Script | Plotly Script |
3D Surface Plot with same xs and ys for all zs
3D Surface Plot
:: [String] | Axis Names |
-> [[[Double]]] | traces ( rows ( values ) ) |
-> PlotConfig | Plot Config |
-> Script | Plot Script |
Parallel Coordinate Plot without line gradient
:: [Double] | Color column |
-> [String] | Axis Labels |
-> [[[Double]]] | traces ( rows ( values ) ) |
-> PlotConfig | Plot Config |
-> Script | Plotly Script |
Parallel Coordinate Plot with discrete line colors
:: [Double] | Color column |
-> [String] | Axis Labels |
-> [[[Double]]] | traces ( rows ( values ) ) |
-> PlotConfig | Plot Config |
-> Script | Plotly Script |
Parallel Coordinate Plot with line gradient
type Script = ByteString Source #
Internal Type Alias
Scatter Mode
Lines | Draw Lines |
Markers | Draw Markers only |
LinesMarkers | Draw Both |
Instances
Eq Mode Source # | |
Show Mode Source # | |
Generic Mode Source # | |
ToJSON Mode Source # | |
Defined in Graphics.Plotly.Internal | |
type Rep Mode Source # | |
Defined in Graphics.Plotly.Internal type Rep Mode = D1 ('MetaData "Mode" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) (C1 ('MetaCons "Lines" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Markers" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LinesMarkers" 'PrefixI 'False) (U1 :: Type -> Type))) |
Plot Type
Scatter | Scatter Plot |
Histogram | Histogram |
Heatmap | Heatmap |
Scatter3D | 3D Scatter |
Surface | 3D Surface |
ParCoords | Parallel Coordinate Plot |
Instances
Eq Type Source # | |
Show Type Source # | |
Generic Type Source # | |
ToJSON Type Source # | |
Defined in Graphics.Plotly.Internal | |
type Rep Type Source # | |
Defined in Graphics.Plotly.Internal type Rep Type = D1 ('MetaData "Type" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) ((C1 ('MetaCons "Scatter" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Histogram" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Heatmap" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Scatter3D" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Surface" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ParCoords" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Layout for Plots
Instances
Bar Layout
Instances
Eq BarMode Source # | |
Show BarMode Source # | |
Generic BarMode Source # | |
ToJSON BarMode Source # | |
Defined in Graphics.Plotly.Internal toEncoding :: BarMode -> Encoding toJSONList :: [BarMode] -> Value toEncodingList :: [BarMode] -> Encoding | |
type Rep BarMode Source # | |
Defined in Graphics.Plotly.Internal type Rep BarMode = D1 ('MetaData "BarMode" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) ((C1 ('MetaCons "Stack" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Group" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Overlay" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Relative" 'PrefixI 'False) (U1 :: Type -> Type))) |
Axis Type
Linear | Linear Axis (default) |
Log | Logarithmic Axis |
Date | Date Axis |
Category | Categorical Axis |
MultiCategory | Multi Category Axis (?) |
Instances
Eq AxisType Source # | |
Show AxisType Source # | |
Generic AxisType Source # | |
ToJSON AxisType Source # | |
Defined in Graphics.Plotly.Internal toEncoding :: AxisType -> Encoding toJSONList :: [AxisType] -> Value toEncodingList :: [AxisType] -> Encoding | |
type Rep AxisType Source # | |
Defined in Graphics.Plotly.Internal type Rep AxisType = D1 ('MetaData "AxisType" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) ((C1 ('MetaCons "Linear" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Log" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Date" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Category" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MultiCategory" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Some Color Strings
Instances
Enum Color Source # | |
Defined in Graphics.Plotly.Internal | |
Eq Color Source # | |
Show Color Source # | |
Generic Color Source # | |
ToJSON Color Source # | |
Defined in Graphics.Plotly.Internal | |
type Rep Color Source # | |
Defined in Graphics.Plotly.Internal type Rep Color = D1 ('MetaData "Color" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) (((C1 ('MetaCons "Red" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Green" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Blue" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Yellow" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Magenta" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cyan" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Black" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Gray" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "White" 'PrefixI 'False) (U1 :: Type -> Type))))) |
type ColorMap = [ColorMapping] Source #
Type alias for a list of color mappings
data ColorScale Source #
Color scales for Heamap / 3D Plots
Discrete | |
Blackbody | |
Bluered | |
Blues | |
Cividis | |
Earth | |
Electric | |
Greens | |
Greys | |
Hot | |
Jet | |
Picnic | |
Portland | |
Rainbow | |
RdBu | |
Reds | |
Viridis | |
YlGnBu | |
YlOrRd |
Instances
Marker Symbols
Instances
Eq Symbol Source # | |
Show Symbol Source # | |
Generic Symbol Source # | |
ToJSON Symbol Source # | |
Defined in Graphics.Plotly.Internal toEncoding :: Symbol -> Encoding toJSONList :: [Symbol] -> Value toEncodingList :: [Symbol] -> Encoding | |
type Rep Symbol Source # | |
Defined in Graphics.Plotly.Internal type Rep Symbol = D1 ('MetaData "Symbol" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) (((C1 ('MetaCons "Circle" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CircleOpen" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cross" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Diamond" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DiamondOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Square" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SquareOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "X" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Marker Config
Instances
Show Marker Source # | |
Generic Marker Source # | |
ToJSON Marker Source # | |
Defined in Graphics.Plotly.Internal toEncoding :: Marker -> Encoding toJSONList :: [Marker] -> Value toEncodingList :: [Marker] -> Encoding | |
type Rep Marker Source # | |
Defined in Graphics.Plotly.Internal type Rep Marker = D1 ('MetaData "Marker" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) (C1 ('MetaCons "Marker" 'PrefixI 'True) (S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: (S1 ('MetaSel ('Just "symbol") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Symbol) :*: S1 ('MetaSel ('Just "opacity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)))) |
Parallel Coordinate Lines
Line | |
|
Instances
Show Line Source # | |
Generic Line Source # | |
ToJSON Line Source # | |
Defined in Graphics.Plotly.Internal | |
type Rep Line Source # | |
Defined in Graphics.Plotly.Internal type Rep Line = D1 ('MetaData "Line" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) (C1 ('MetaCons "Line" 'PrefixI 'True) ((S1 ('MetaSel ('Just "showscale") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "reversescale") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "colorscale") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ColorScale)) :*: (S1 ('MetaSel ('Just "colormap") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ColorMap)) :*: S1 ('MetaSel ('Just "color") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe [Double])))))) |
Bins in Histogram
Instances
Show XBins Source # | |
Generic XBins Source # | |
ToJSON XBins Source # | |
Defined in Graphics.Plotly.Internal | |
type Rep XBins Source # | |
Defined in Graphics.Plotly.Internal type Rep XBins = D1 ('MetaData "XBins" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) (C1 ('MetaCons "XBins" 'PrefixI 'True) (S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: (S1 ('MetaSel ('Just "start") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "end") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Double))))) |
Layout Margins
Instances
Eq Margin Source # | |
Show Margin Source # | |
Generic Margin Source # | |
ToJSON Margin Source # | |
Defined in Graphics.Plotly.Internal toEncoding :: Margin -> Encoding toJSONList :: [Margin] -> Value toEncodingList :: [Margin] -> Encoding | |
type Rep Margin Source # | |
Defined in Graphics.Plotly.Internal type Rep Margin = D1 ('MetaData "Margin" "Graphics.Plotly.Internal" "plotly-hs-0.1.0.0-5GqvvACHt0P1rkfhVJsYpr" 'False) (C1 ('MetaCons "Margin" 'PrefixI 'True) ((S1 ('MetaSel ('Just "l") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "r") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "b") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "t") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))) |
data PlotConfig Source #
Trace Independent Plot Config
PlotConfig | |
|
Instances
Show PlotConfig Source # | |
Defined in Graphics.Plotly.Default showsPrec :: Int -> PlotConfig -> ShowS # show :: PlotConfig -> String # showList :: [PlotConfig] -> ShowS # |
defaultConfig :: PlotConfig Source #
Default PlotConfig