/plotly-hs

Generate Plotly Plots from Haskell for viewing in Browser. No bindings.

Primary LanguageHaskellOtherNOASSERTION

Plotly Plots from Haskell

Generates an HTML Document with a Plotly Plot. These are not bindings to anything.

For more details see the documentation.

Example

The basic line plot example is recreated like this:

import Graphics.Plotly

main :: IO ()
main = plot path script
  where
    script = scatter' [] [[1, 2, 3, 4], [1, 2, 3, 4]]
                         [[10, 15, 13, 17], [16, 5, 11, 9]]
           $ defaultConfig { lineMode = LinesMarkers }
    path   = "path/to/dir/plot.html"

Then navigate to path/to/dir/plot.html with a web browser.

More Examples

More examples can be found in ./src/Graphics/Plotly/Example.hs the results of which are stored in ./plots.

Usage with Stack

Add this to stack.yaml:

extra-deps:
  - github: AugustUnderground/plotly-hs
    commit: 62951b8991d991ff46967e3dd0742bcd9c89bdac