Copyright | (c) Laurent P René de Cotret 2019 |
---|---|
License | MIT |
Maintainer | laurent.decotret@outlook.com |
Stability | internal |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module defines types and functions that help with keeping track of figure specifications
Synopsis
- data FigureSpec = FigureSpec {
- caption :: String
- script :: PythonScript
- saveFormat :: SaveFormat
- directory :: FilePath
- dpi :: Int
- blockAttrs :: Attr
- data SaveFormat
- saveFormatFromString :: String -> Maybe SaveFormat
- figurePath :: FigureSpec -> FilePath
- hiresFigurePath :: FigureSpec -> FilePath
- addPlotCapture :: FigureSpec -> PythonScript
- extension :: SaveFormat -> String
Documentation
data FigureSpec Source #
Datatype containing all parameters required to run pandoc-pyplot
FigureSpec | |
|
Instances
Hashable FigureSpec Source # | |
Defined in Text.Pandoc.Filter.FigureSpec hashWithSalt :: Int -> FigureSpec -> Int # hash :: FigureSpec -> Int # |
saveFormatFromString :: String -> Maybe SaveFormat Source #
Parse an image save format string
figurePath :: FigureSpec -> FilePath Source #
Determine the path a figure should have.
hiresFigurePath :: FigureSpec -> FilePath Source #
The path to the high-resolution figure.
:: FigureSpec | Path where to save the figure |
-> PythonScript | Code block with added capture |
Modify a Python plotting script to save the figure to a filename. An additional file (with extension PNG) will also be captured.
extension :: SaveFormat -> String Source #
Save format file extension