QuickPlot 0.1.0.0 → 0.1.0.1
raw patch · 3 files changed
+29/−20 lines, 3 filesdep −colourdep ~aesondep ~attoparsecdep ~base
Dependencies removed: colour
Dependency ranges changed: aeson, attoparsec, base, bytestring, haskell-src-meta, parsec, scientific, snap, snap-core, template-haskell, text, vector, websockets, websockets-snap
Files
- QuickPlot.cabal +14/−15
- README.md +5/−1
- src/QuickPlot/Plotly.hs +10/−4
QuickPlot.cabal view
@@ -1,5 +1,5 @@ name: QuickPlot-version: 0.1.0.0+version: 0.1.0.1 synopsis: Quick and easy data visualization with Haskell description: Please see README.md homepage: http://github.com/tepf/QuickPlot#readme@@ -26,20 +26,19 @@ , QuickPlot.Plotly , QuickPlot.Vis build-depends: base >= 4.7 && < 5- , aeson- , bytestring- , text- , colour- , snap- , snap-core- , websockets-snap- , websockets- , vector- , scientific- , attoparsec- , parsec- , template-haskell- , haskell-src-meta+ , aeson >= 0.9.0.1+ , bytestring >= 0.10.6+ , text >= 1.2.2+ , snap >= 0.14.0.6+ , snap-core >= 0.9.8+ , websockets-snap >= 0.9.2+ , websockets >= 0.9.6.1+ , vector >= 0.11+ , scientific >= 0.3.4.4+ , attoparsec >= 0.13.0.1+ , parsec >= 3.1.9+ , template-haskell >= 2.10+ , haskell-src-meta >= 0.6.0.13 other-modules: Paths_QuickPlot , QuickPlot.IPC.Protocol , QuickPlot.IPC.QQ
README.md view
@@ -21,7 +21,11 @@ **0. Install QuickPlot** -At the moment just manually.+````haskell+stack install QuickPlot+cabal install QuickPlot+-- or manually+```` **1. Import QuickPlot**
src/QuickPlot/Plotly.hs view
@@ -5,6 +5,8 @@ module QuickPlot.Plotly ( plotly , PlotlyJSON (..)+ , PlotlyData+ , PlotlyLayout ) where import QuickPlot@@ -16,26 +18,30 @@ import Data.Aeson hiding (json) -instance Plottable PlotlyJSON where+type PlotlyData = PlotlyJSON+type PlotlyLayout = PlotlyJSON+++instance Plottable PlotlyData where plottableToJSON (PlotlyJSON trace) = [json|{ data : [ #{ trace } ] }|] whichLibrary _ = Plotly -instance Plottable [PlotlyJSON] where+instance Plottable [PlotlyData] where plottableToJSON traces = [json|{ data : #{ traces } }|] whichLibrary _ = Plotly -instance Plottable (PlotlyJSON, PlotlyJSON) where+instance Plottable (PlotlyData, PlotlyLayout) where plottableToJSON (traces, layout) = [json|{ data : [ #{ traces } ] , layout : #{ layout } }|] whichLibrary _ = Plotly -instance Plottable ([PlotlyJSON], PlotlyJSON) where+instance Plottable ([PlotlyData], PlotlyLayout) where plottableToJSON (traces, layout) = [json|{ data : #{ traces } , layout : #{ layout }