plot 0.1.5 → 0.1.5.1
raw patch · 5 files changed
+16/−16 lines, 5 files
Files
- lib/Graphics/Rendering/Plot/Figure.hs +2/−2
- lib/Graphics/Rendering/Plot/Figure/Plot.hs +2/−2
- lib/Graphics/Rendering/Plot/Figure/Plot/Axis.hs +10/−10
- lib/Graphics/Rendering/Plot/Types.hs +1/−1
- plot.cabal +1/−1
lib/Graphics/Rendering/Plot/Figure.hs view
@@ -100,8 +100,8 @@ , setTicks , setGridlines , setTickLabelFormat- , setDataLabels- , withDataLabelFormat+ , setTickLabels+ , withTickLabelFormat , withAxisLabel , withAxisLine , withGridLine
lib/Graphics/Rendering/Plot/Figure/Plot.hs view
@@ -69,8 +69,8 @@ , AX.setTicks , AX.setGridlines , AX.setTickLabelFormat- , AX.setDataLabels- , AX.withDataLabelFormat+ , AX.setTickLabels+ , AX.withTickLabelFormat , AX.withAxisLabel , AX.withAxisLine , AX.withGridLine
lib/Graphics/Rendering/Plot/Figure/Plot/Axis.hs view
@@ -19,8 +19,8 @@ , setTicks , setGridlines , setTickLabelFormat- , setDataLabels- , withDataLabelFormat+ , setTickLabels+ , withTickLabelFormat , withAxisLabel , withAxisLine , withGridLine@@ -53,8 +53,8 @@ changeLabel :: (TextEntry -> TextEntry) -> AxisData -> AxisData changeLabel f ax = ax { _label = f (_label ax) } -changeDataLabels :: ([TextEntry] -> [TextEntry]) -> AxisData -> AxisData-changeDataLabels f ax = ax { _data_labels = f (_data_labels ax) }+changeTickLabels :: ([TextEntry] -> [TextEntry]) -> AxisData -> AxisData+changeTickLabels f ax = ax { _tick_labels = f (_tick_labels ax) } ----------------------------------------------------------------------------- @@ -105,16 +105,16 @@ setTickLabelFormat tf = modify $ \s -> changeTickFormat tf s -- | a list of data labels-setDataLabels :: [String] -> Axis ()-setDataLabels dl = modify $ \s -> - changeDataLabels (const (map BareText dl)) s+setTickLabels :: [String] -> Axis ()+setTickLabels dl = modify $ \s -> + changeTickLabels (const (map BareText dl)) s -- | format the data labels-withDataLabelFormat :: Text () -> Axis ()-withDataLabelFormat m = do+withTickLabelFormat :: Text () -> Axis ()+withTickLabelFormat m = do ax <- get to <- asks _textoptions- put $ ax { _data_labels = map (execText m to) (_data_labels ax) }+ put $ ax { _tick_labels = map (execText m to) (_tick_labels ax) } -- | operate on the axis label withAxisLabel :: Text () -> Axis ()
lib/Graphics/Rendering/Plot/Types.hs view
@@ -205,7 +205,7 @@ , _minor_ticks :: Maybe Ticks , _major_ticks :: Maybe Ticks , _tick_format :: TickFormat- , _data_labels :: [TextEntry]+ , _tick_labels :: [TextEntry] , _label :: TextEntry } -- want line styles, so that, e.g., axes in centre of chart are grey or dashed etc.
plot.cabal view
@@ -1,5 +1,5 @@ Name: plot-Version: 0.1.5+Version: 0.1.5.1 License: BSD3 License-file: LICENSE Copyright: (c) A.V.H. McPhail 2010, 2012