-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support to show a plot of metrics over time
- Loading branch information
1 parent
4dd1016
commit 6a7a4b7
Showing
5 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Plot where | ||
import Graphics.Matplotlib (onscreen, plot, Matplotlib, toSvg) | ||
import Graphics.Matplotlib.Internal (pySVG) | ||
import Data.Aeson (ToJSON) | ||
import Text.Blaze.Html (Html, preEscapedToHtml) | ||
|
||
|
||
plotSVG :: (ToJSON a, Num a) => [a] -> [a] -> IO Html | ||
plotSVG xs ys = preEscapedToHtml <$> do | ||
let p = plot xs ys | ||
svg <- toSvg p | ||
return $ case svg of | ||
(Left x) -> x | ||
(Right x) -> x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters