packages feed

Chart 1.2.4 → 1.3

raw patch · 26 files changed

+441/−146 lines, 26 filesdep ~mtlPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: mtl

API changes (from Hackage documentation)

- Graphics.Rendering.Chart.Axis.Floating: defaultLinearAxis :: (Show a, RealFloat a) => LinearAxisParams a
- Graphics.Rendering.Chart.Axis.Floating: defaultLogAxis :: (Show a, RealFloat a) => LogAxisParams a
- Graphics.Rendering.Chart.Axis.Types: defaultAxisStyle :: AxisStyle
- Graphics.Rendering.Chart.Backend: _fill_colour :: FillStyle -> AlphaColour Double
- Graphics.Rendering.Chart.Backend: defaultFontStyle :: FontStyle
- Graphics.Rendering.Chart.Backend: type CRender a = ChartBackend a
- Graphics.Rendering.Chart.Backend.Impl: type CRender a = ChartBackend a
- Graphics.Rendering.Chart.Backend.Types: _fill_colour :: FillStyle -> AlphaColour Double
- Graphics.Rendering.Chart.Backend.Types: defaultFontStyle :: FontStyle
- Graphics.Rendering.Chart.Drawing: defaultPointStyle :: PointStyle
- Graphics.Rendering.Chart.Layout: defaultLayoutAxis :: PlotValue t => LayoutAxis t
- Graphics.Rendering.Chart.Layout: defaultStackedLayouts :: StackedLayouts x
- Graphics.Rendering.Chart.Layout: setLayoutForeground :: AlphaColour Double -> Layout x y -> Layout x y
- Graphics.Rendering.Chart.Layout: setLayoutLRForeground :: AlphaColour Double -> LayoutLR x yl yr -> LayoutLR x yl yr
- Graphics.Rendering.Chart.Layout: updateAllAxesStyles :: (AxisStyle -> AxisStyle) -> Layout x y -> Layout x y
- Graphics.Rendering.Chart.Layout: updateAllAxesStylesLR :: (AxisStyle -> AxisStyle) -> LayoutLR x yl yr -> LayoutLR x yl yr
- Graphics.Rendering.Chart.Legend: defaultLegendStyle :: LegendStyle
- Graphics.Rendering.Chart.Plot.Annotation: defaultPlotAnnotation :: PlotAnnotation x y
- Graphics.Rendering.Chart.Plot.AreaSpots: defaultAreaSpots :: AreaSpots z x y
- Graphics.Rendering.Chart.Plot.AreaSpots: defaultAreaSpots4D :: AreaSpots4D z t x y
- Graphics.Rendering.Chart.Plot.Bars: defaultPlotBars :: BarsPlotValue y => PlotBars x y
- Graphics.Rendering.Chart.Plot.Candle: defaultPlotCandle :: PlotCandle x y
- Graphics.Rendering.Chart.Plot.ErrBars: defaultPlotErrBars :: PlotErrBars x y
- Graphics.Rendering.Chart.Plot.FillBetween: defaultPlotFillBetween :: PlotFillBetween x y
- Graphics.Rendering.Chart.Plot.Lines: defaultPlotLines :: PlotLines x y
- Graphics.Rendering.Chart.Plot.Pie: defaultPieChart :: PieChart
- Graphics.Rendering.Chart.Plot.Pie: defaultPieItem :: PieItem
- Graphics.Rendering.Chart.Plot.Pie: defaultPieLayout :: PieLayout
- Graphics.Rendering.Chart.Plot.Points: defaultPlotPoints :: PlotPoints x y
+ Graphics.Rendering.Chart.Backend: _fill_color :: FillStyle -> AlphaColour Double
+ Graphics.Rendering.Chart.Backend.Types: _fill_color :: FillStyle -> AlphaColour Double
+ Graphics.Rendering.Chart.Backend.Types: fill_color :: Iso' FillStyle (AlphaColour Double)
+ Graphics.Rendering.Chart.Drawing: PointShapeArrowHead :: Double -> PointShape
+ Graphics.Rendering.Chart.Drawing: arrows :: Double -> Double -> Double -> AlphaColour Double -> PointStyle
+ Graphics.Rendering.Chart.Easy: bars :: (PlotValue x, BarsPlotValue y) => [String] -> [(x, [y])] -> EC l (PlotBars x y)
+ Graphics.Rendering.Chart.Easy: line :: String -> [[(x, y)]] -> EC l (PlotLines x y)
+ Graphics.Rendering.Chart.Easy: points :: String -> [(x, y)] -> EC l (PlotPoints x y)
+ Graphics.Rendering.Chart.Easy: setColors :: [AlphaColour Double] -> EC l ()
+ Graphics.Rendering.Chart.Geometry: vangle :: Vector -> Double
+ Graphics.Rendering.Chart.Geometry: vlen :: Vector -> Double
+ Graphics.Rendering.Chart.Layout: layout_all_font_styles :: Setter' (Layout x y) FontStyle
+ Graphics.Rendering.Chart.Layout: layout_axes_styles :: Setter' (Layout x y) AxisStyle
+ Graphics.Rendering.Chart.Layout: layout_axes_title_styles :: Setter' (Layout x y) FontStyle
+ Graphics.Rendering.Chart.Layout: layout_foreground :: Setter' (Layout x y) (AlphaColour Double)
+ Graphics.Rendering.Chart.Layout: layoutlr_all_font_styles :: Setter' (LayoutLR x y1 y2) FontStyle
+ Graphics.Rendering.Chart.Layout: layoutlr_axes_styles :: Setter' (LayoutLR x y1 y2) AxisStyle
+ Graphics.Rendering.Chart.Layout: layoutlr_axes_title_styles :: Setter' (LayoutLR x y1 y2) FontStyle
+ Graphics.Rendering.Chart.Layout: layoutlr_foreground :: Setter' (LayoutLR x y1 y2) (AlphaColour Double)
+ Graphics.Rendering.Chart.Plot.Types: instance ToPlot Plot
+ Graphics.Rendering.Chart.Plot.Vectors: PlotVectors :: String -> VectorStyle -> Double -> [(x, y)] -> ((x, y) -> (x, y)) -> [((x, y), (x, y))] -> PlotVectors x y
+ Graphics.Rendering.Chart.Plot.Vectors: VectorStyle :: LineStyle -> PointStyle -> VectorStyle
+ Graphics.Rendering.Chart.Plot.Vectors: _plot_vectors_grid :: PlotVectors x y -> [(x, y)]
+ Graphics.Rendering.Chart.Plot.Vectors: _plot_vectors_mapf :: PlotVectors x y -> (x, y) -> (x, y)
+ Graphics.Rendering.Chart.Plot.Vectors: _plot_vectors_scale :: PlotVectors x y -> Double
+ Graphics.Rendering.Chart.Plot.Vectors: _plot_vectors_style :: PlotVectors x y -> VectorStyle
+ Graphics.Rendering.Chart.Plot.Vectors: _plot_vectors_title :: PlotVectors x y -> String
+ Graphics.Rendering.Chart.Plot.Vectors: _plot_vectors_values :: PlotVectors x y -> [((x, y), (x, y))]
+ Graphics.Rendering.Chart.Plot.Vectors: _vector_head_style :: VectorStyle -> PointStyle
+ Graphics.Rendering.Chart.Plot.Vectors: _vector_line_style :: VectorStyle -> LineStyle
+ Graphics.Rendering.Chart.Plot.Vectors: data PlotVectors x y
+ Graphics.Rendering.Chart.Plot.Vectors: data VectorStyle
+ Graphics.Rendering.Chart.Plot.Vectors: instance Default (PlotVectors x y)
+ Graphics.Rendering.Chart.Plot.Vectors: instance Default VectorStyle
+ Graphics.Rendering.Chart.Plot.Vectors: plotVectorField :: (PlotValue x, PlotValue y) => PlotVectors x y -> Plot x y
+ Graphics.Rendering.Chart.Plot.Vectors: plot_vectors_grid :: Lens' (PlotVectors x_axhl y_axhm) [(x_axhl, y_axhm)]
+ Graphics.Rendering.Chart.Plot.Vectors: plot_vectors_mapf :: Lens' (PlotVectors x_axhl y_axhm) ((x_axhl, y_axhm) -> (x_axhl, y_axhm))
+ Graphics.Rendering.Chart.Plot.Vectors: plot_vectors_scale :: Lens' (PlotVectors x_axhl y_axhm) Double
+ Graphics.Rendering.Chart.Plot.Vectors: plot_vectors_style :: Lens' (PlotVectors x_axhl y_axhm) VectorStyle
+ Graphics.Rendering.Chart.Plot.Vectors: plot_vectors_title :: Lens' (PlotVectors x_axhl y_axhm) String
+ Graphics.Rendering.Chart.Plot.Vectors: plot_vectors_values :: Lens' (PlotVectors x_axhl y_axhm) [((x_axhl, y_axhm), (x_axhl, y_axhm))]
+ Graphics.Rendering.Chart.Plot.Vectors: vector_head_style :: Lens' VectorStyle PointStyle
+ Graphics.Rendering.Chart.Plot.Vectors: vector_line_style :: Lens' VectorStyle LineStyle
+ Graphics.Rendering.Chart.State: colors :: Lens' CState [AlphaColour Double]
+ Graphics.Rendering.Chart.State: data CState
+ Graphics.Rendering.Chart.State: execEC :: Default l => EC l a -> l
+ Graphics.Rendering.Chart.State: instance Default CState
+ Graphics.Rendering.Chart.State: liftCState :: State CState a -> EC l a
+ Graphics.Rendering.Chart.State: liftEC :: Default l1 => EC l1 a -> EC l2 l1
+ Graphics.Rendering.Chart.State: plot :: ToPlot p => EC (Layout x y) (p x y) -> EC (Layout x y) ()
+ Graphics.Rendering.Chart.State: plotLeft :: ToPlot p => EC (LayoutLR x y1 y2) (p x y1) -> EC (LayoutLR x y1 y2) ()
+ Graphics.Rendering.Chart.State: plotRight :: ToPlot p => EC (LayoutLR x y1 y2) (p x y2) -> EC (LayoutLR x y1 y2) ()
+ Graphics.Rendering.Chart.State: shapes :: Lens' CState [PointShape]
+ Graphics.Rendering.Chart.State: takeColor :: EC l (AlphaColour Double)
+ Graphics.Rendering.Chart.State: takeShape :: EC l PointShape
+ Graphics.Rendering.Chart.State: type EC l a = StateT l (State CState) a
- Graphics.Rendering.Chart.Axis.Floating: la_labelf :: Lens (LinearAxisParams a_ajus) (LinearAxisParams a_ajQG) (a_ajus -> String) (a_ajQG -> String)
+ Graphics.Rendering.Chart.Axis.Floating: la_labelf :: Lens (LinearAxisParams a_ajFX) (LinearAxisParams a_ak1W) (a_ajFX -> String) (a_ak1W -> String)
- Graphics.Rendering.Chart.Axis.Floating: la_nLabels :: Lens' (LinearAxisParams a_ajus) Int
+ Graphics.Rendering.Chart.Axis.Floating: la_nLabels :: Lens' (LinearAxisParams a_ajFX) Int
- Graphics.Rendering.Chart.Axis.Floating: la_nTicks :: Lens' (LinearAxisParams a_ajus) Int
+ Graphics.Rendering.Chart.Axis.Floating: la_nTicks :: Lens' (LinearAxisParams a_ajFX) Int
- Graphics.Rendering.Chart.Axis.Floating: loga_labelf :: Iso (LogAxisParams a_ajur) (LogAxisParams a_ajRo) (a_ajur -> String) (a_ajRo -> String)
+ Graphics.Rendering.Chart.Axis.Floating: loga_labelf :: Iso (LogAxisParams a_ajFW) (LogAxisParams a_ak2E) (a_ajFW -> String) (a_ak2E -> String)
- Graphics.Rendering.Chart.Axis.Types: axis_grid :: Lens' (AxisData x_afV9) [x_afV9]
+ Graphics.Rendering.Chart.Axis.Types: axis_grid :: Lens' (AxisData x_ag76) [x_ag76]
- Graphics.Rendering.Chart.Axis.Types: axis_labels :: Lens' (AxisData x_afV9) [[(x_afV9, String)]]
+ Graphics.Rendering.Chart.Axis.Types: axis_labels :: Lens' (AxisData x_ag76) [[(x_ag76, String)]]
- Graphics.Rendering.Chart.Axis.Types: axis_ticks :: Lens' (AxisData x_afV9) [(x_afV9, Double)]
+ Graphics.Rendering.Chart.Axis.Types: axis_ticks :: Lens' (AxisData x_ag76) [(x_ag76, Double)]
- Graphics.Rendering.Chart.Axis.Types: axis_tropweiv :: Lens' (AxisData x_afV9) (Range -> Double -> x_afV9)
+ Graphics.Rendering.Chart.Axis.Types: axis_tropweiv :: Lens' (AxisData x_ag76) (Range -> Double -> x_ag76)
- Graphics.Rendering.Chart.Axis.Types: axis_viewport :: Lens' (AxisData x_afV9) (Range -> x_afV9 -> Double)
+ Graphics.Rendering.Chart.Axis.Types: axis_viewport :: Lens' (AxisData x_ag76) (Range -> x_ag76 -> Double)
- Graphics.Rendering.Chart.Axis.Types: axis_visibility :: Lens' (AxisData x_afV9) AxisVisibility
+ Graphics.Rendering.Chart.Axis.Types: axis_visibility :: Lens' (AxisData x_ag76) AxisVisibility
- Graphics.Rendering.Chart.Layout: laxis_generate :: Lens' (LayoutAxis x_aGGX) (AxisFn x_aGGX)
+ Graphics.Rendering.Chart.Layout: laxis_generate :: Lens' (LayoutAxis x_aIFy) (AxisFn x_aIFy)
- Graphics.Rendering.Chart.Layout: laxis_override :: Lens' (LayoutAxis x_aGGX) (AxisData x_aGGX -> AxisData x_aGGX)
+ Graphics.Rendering.Chart.Layout: laxis_override :: Lens' (LayoutAxis x_aIFy) (AxisData x_aIFy -> AxisData x_aIFy)
- Graphics.Rendering.Chart.Layout: laxis_reverse :: Lens' (LayoutAxis x_aGGX) Bool
+ Graphics.Rendering.Chart.Layout: laxis_reverse :: Lens' (LayoutAxis x_aIFy) Bool
- Graphics.Rendering.Chart.Layout: laxis_style :: Lens' (LayoutAxis x_aGGX) AxisStyle
+ Graphics.Rendering.Chart.Layout: laxis_style :: Lens' (LayoutAxis x_aIFy) AxisStyle
- Graphics.Rendering.Chart.Layout: laxis_title :: Lens' (LayoutAxis x_aGGX) String
+ Graphics.Rendering.Chart.Layout: laxis_title :: Lens' (LayoutAxis x_aIFy) String
- Graphics.Rendering.Chart.Layout: laxis_title_style :: Lens' (LayoutAxis x_aGGX) FontStyle
+ Graphics.Rendering.Chart.Layout: laxis_title_style :: Lens' (LayoutAxis x_aIFy) FontStyle
- Graphics.Rendering.Chart.Layout: layout_background :: Lens' (Layout x_aGGS y_aGGT) FillStyle
+ Graphics.Rendering.Chart.Layout: layout_background :: Lens' (Layout x_aIFt y_aIFu) FillStyle
- Graphics.Rendering.Chart.Layout: layout_bottom_axis_visibility :: Lens' (Layout x_aGGS y_aGGT) AxisVisibility
+ Graphics.Rendering.Chart.Layout: layout_bottom_axis_visibility :: Lens' (Layout x_aIFt y_aIFu) AxisVisibility
- Graphics.Rendering.Chart.Layout: layout_grid_last :: Lens' (Layout x_aGGS y_aGGT) Bool
+ Graphics.Rendering.Chart.Layout: layout_grid_last :: Lens' (Layout x_aIFt y_aIFu) Bool
- Graphics.Rendering.Chart.Layout: layout_left_axis_visibility :: Lens' (Layout x_aGGS y_aGGT) AxisVisibility
+ Graphics.Rendering.Chart.Layout: layout_left_axis_visibility :: Lens' (Layout x_aIFt y_aIFu) AxisVisibility
- Graphics.Rendering.Chart.Layout: layout_legend :: Lens' (Layout x_aGGS y_aGGT) (Maybe LegendStyle)
+ Graphics.Rendering.Chart.Layout: layout_legend :: Lens' (Layout x_aIFt y_aIFu) (Maybe LegendStyle)
- Graphics.Rendering.Chart.Layout: layout_margin :: Lens' (Layout x_aGGS y_aGGT) Double
+ Graphics.Rendering.Chart.Layout: layout_margin :: Lens' (Layout x_aIFt y_aIFu) Double
- Graphics.Rendering.Chart.Layout: layout_plot_background :: Lens' (Layout x_aGGS y_aGGT) (Maybe FillStyle)
+ Graphics.Rendering.Chart.Layout: layout_plot_background :: Lens' (Layout x_aIFt y_aIFu) (Maybe FillStyle)
- Graphics.Rendering.Chart.Layout: layout_plots :: Lens' (Layout x_aGGS y_aGGT) [Plot x_aGGS y_aGGT]
+ Graphics.Rendering.Chart.Layout: layout_plots :: Lens' (Layout x_aIFt y_aIFu) [Plot x_aIFt y_aIFu]
- Graphics.Rendering.Chart.Layout: layout_right_axis_visibility :: Lens' (Layout x_aGGS y_aGGT) AxisVisibility
+ Graphics.Rendering.Chart.Layout: layout_right_axis_visibility :: Lens' (Layout x_aIFt y_aIFu) AxisVisibility
- Graphics.Rendering.Chart.Layout: layout_title :: Lens' (Layout x_aGGS y_aGGT) String
+ Graphics.Rendering.Chart.Layout: layout_title :: Lens' (Layout x_aIFt y_aIFu) String
- Graphics.Rendering.Chart.Layout: layout_title_style :: Lens' (Layout x_aGGS y_aGGT) FontStyle
+ Graphics.Rendering.Chart.Layout: layout_title_style :: Lens' (Layout x_aIFt y_aIFu) FontStyle
- Graphics.Rendering.Chart.Layout: layout_top_axis_visibility :: Lens' (Layout x_aGGS y_aGGT) AxisVisibility
+ Graphics.Rendering.Chart.Layout: layout_top_axis_visibility :: Lens' (Layout x_aIFt y_aIFu) AxisVisibility
- Graphics.Rendering.Chart.Layout: layout_x_axis :: Lens' (Layout x_aGGS y_aGGT) (LayoutAxis x_aGGS)
+ Graphics.Rendering.Chart.Layout: layout_x_axis :: Lens' (Layout x_aIFt y_aIFu) (LayoutAxis x_aIFt)
- Graphics.Rendering.Chart.Layout: layout_y_axis :: Lens' (Layout x_aGGS y_aGGT) (LayoutAxis y_aGGT)
+ Graphics.Rendering.Chart.Layout: layout_y_axis :: Lens' (Layout x_aIFt y_aIFu) (LayoutAxis y_aIFu)
- Graphics.Rendering.Chart.Layout: layoutlr_background :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) FillStyle
+ Graphics.Rendering.Chart.Layout: layoutlr_background :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) FillStyle
- Graphics.Rendering.Chart.Layout: layoutlr_bottom_axis_visibility :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) AxisVisibility
+ Graphics.Rendering.Chart.Layout: layoutlr_bottom_axis_visibility :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) AxisVisibility
- Graphics.Rendering.Chart.Layout: layoutlr_grid_last :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) Bool
+ Graphics.Rendering.Chart.Layout: layoutlr_grid_last :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) Bool
- Graphics.Rendering.Chart.Layout: layoutlr_left_axis :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) (LayoutAxis y1_aGG2)
+ Graphics.Rendering.Chart.Layout: layoutlr_left_axis :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) (LayoutAxis y1_aIED)
- Graphics.Rendering.Chart.Layout: layoutlr_left_axis_visibility :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) AxisVisibility
+ Graphics.Rendering.Chart.Layout: layoutlr_left_axis_visibility :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) AxisVisibility
- Graphics.Rendering.Chart.Layout: layoutlr_legend :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) (Maybe LegendStyle)
+ Graphics.Rendering.Chart.Layout: layoutlr_legend :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) (Maybe LegendStyle)
- Graphics.Rendering.Chart.Layout: layoutlr_margin :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) Double
+ Graphics.Rendering.Chart.Layout: layoutlr_margin :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) Double
- Graphics.Rendering.Chart.Layout: layoutlr_plot_background :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) (Maybe FillStyle)
+ Graphics.Rendering.Chart.Layout: layoutlr_plot_background :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) (Maybe FillStyle)
- Graphics.Rendering.Chart.Layout: layoutlr_plots :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) [Either (Plot x_aGG1 y1_aGG2) (Plot x_aGG1 y2_aGG3)]
+ Graphics.Rendering.Chart.Layout: layoutlr_plots :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) [Either (Plot x_aIEC y1_aIED) (Plot x_aIEC y2_aIEE)]
- Graphics.Rendering.Chart.Layout: layoutlr_right_axis :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) (LayoutAxis y2_aGG3)
+ Graphics.Rendering.Chart.Layout: layoutlr_right_axis :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) (LayoutAxis y2_aIEE)
- Graphics.Rendering.Chart.Layout: layoutlr_right_axis_visibility :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) AxisVisibility
+ Graphics.Rendering.Chart.Layout: layoutlr_right_axis_visibility :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) AxisVisibility
- Graphics.Rendering.Chart.Layout: layoutlr_title :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) String
+ Graphics.Rendering.Chart.Layout: layoutlr_title :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) String
- Graphics.Rendering.Chart.Layout: layoutlr_title_style :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) FontStyle
+ Graphics.Rendering.Chart.Layout: layoutlr_title_style :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) FontStyle
- Graphics.Rendering.Chart.Layout: layoutlr_top_axis_visibility :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) AxisVisibility
+ Graphics.Rendering.Chart.Layout: layoutlr_top_axis_visibility :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) AxisVisibility
- Graphics.Rendering.Chart.Layout: layoutlr_x_axis :: Lens' (LayoutLR x_aGG1 y1_aGG2 y2_aGG3) (LayoutAxis x_aGG1)
+ Graphics.Rendering.Chart.Layout: layoutlr_x_axis :: Lens' (LayoutLR x_aIEC y1_aIED y2_aIEE) (LayoutAxis x_aIEC)
- Graphics.Rendering.Chart.Layout: slayouts_compress_legend :: Lens' (StackedLayouts x_aGFW) Bool
+ Graphics.Rendering.Chart.Layout: slayouts_compress_legend :: Lens' (StackedLayouts x_aIEx) Bool
- Graphics.Rendering.Chart.Layout: slayouts_layouts :: Lens (StackedLayouts x_aGFW) (StackedLayouts x_aHgQ) [StackedLayout x_aGFW] [StackedLayout x_aHgQ]
+ Graphics.Rendering.Chart.Layout: slayouts_layouts :: Lens (StackedLayouts x_aIEx) (StackedLayouts x_aJfv) [StackedLayout x_aIEx] [StackedLayout x_aJfv]
- Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_angle :: Lens' (PlotAnnotation x_aCNU y_aCNV) Double
+ Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_angle :: Lens' (PlotAnnotation x_aEPu y_aEPv) Double
- Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_hanchor :: Lens' (PlotAnnotation x_aCNU y_aCNV) HTextAnchor
+ Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_hanchor :: Lens' (PlotAnnotation x_aEPu y_aEPv) HTextAnchor
- Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_style :: Lens' (PlotAnnotation x_aCNU y_aCNV) FontStyle
+ Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_style :: Lens' (PlotAnnotation x_aEPu y_aEPv) FontStyle
- Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_values :: Lens (PlotAnnotation x_aCNU y_aCNV) (PlotAnnotation x_aCPV y_aCPW) [(x_aCNU, y_aCNV, String)] [(x_aCPV, y_aCPW, String)]
+ Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_values :: Lens (PlotAnnotation x_aEPu y_aEPv) (PlotAnnotation x_aERq y_aERr) [(x_aEPu, y_aEPv, String)] [(x_aERq, y_aERr, String)]
- Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_vanchor :: Lens' (PlotAnnotation x_aCNU y_aCNV) VTextAnchor
+ Graphics.Rendering.Chart.Plot.Annotation: plot_annotation_vanchor :: Lens' (PlotAnnotation x_aEPu y_aEPv) VTextAnchor
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_linethick :: Lens' (AreaSpots4D z_aDbO t_aDbP x_aDbQ y_aDbR) Double
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_linethick :: Lens' (AreaSpots4D z_aFcT t_aFcU x_aFcV y_aFcW) Double
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_max_radius :: Lens' (AreaSpots4D z_aDbO t_aDbP x_aDbQ y_aDbR) Double
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_max_radius :: Lens' (AreaSpots4D z_aFcT t_aFcU x_aFcV y_aFcW) Double
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_opacity :: Lens' (AreaSpots4D z_aDbO t_aDbP x_aDbQ y_aDbR) Double
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_opacity :: Lens' (AreaSpots4D z_aFcT t_aFcU x_aFcV y_aFcW) Double
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_palette :: Lens' (AreaSpots4D z_aDbO t_aDbP x_aDbQ y_aDbR) [Colour Double]
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_palette :: Lens' (AreaSpots4D z_aFcT t_aFcU x_aFcV y_aFcW) [Colour Double]
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_title :: Lens' (AreaSpots4D z_aDbO t_aDbP x_aDbQ y_aDbR) String
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_title :: Lens' (AreaSpots4D z_aFcT t_aFcU x_aFcV y_aFcW) String
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_values :: Lens (AreaSpots4D z_aDbO t_aDbP x_aDbQ y_aDbR) (AreaSpots4D z_aDqB t_aDqC x_aDqD y_aDqE) [(x_aDbQ, y_aDbR, z_aDbO, t_aDbP)] [(x_aDqD, y_aDqE, z_aDqB, t_aDqC)]
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_4d_values :: Lens (AreaSpots4D z_aFcT t_aFcU x_aFcV y_aFcW) (AreaSpots4D z_aFrg t_aFrh x_aFri y_aFrj) [(x_aFcV, y_aFcW, z_aFcT, t_aFcU)] [(x_aFri, y_aFrj, z_aFrg, t_aFrh)]
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_fillcolour :: Lens' (AreaSpots z_aDbS x_aDbT y_aDbU) (Colour Double)
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_fillcolour :: Lens' (AreaSpots z_aFcX x_aFcY y_aFcZ) (Colour Double)
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_linecolour :: Lens' (AreaSpots z_aDbS x_aDbT y_aDbU) (AlphaColour Double)
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_linecolour :: Lens' (AreaSpots z_aFcX x_aFcY y_aFcZ) (AlphaColour Double)
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_linethick :: Lens' (AreaSpots z_aDbS x_aDbT y_aDbU) Double
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_linethick :: Lens' (AreaSpots z_aFcX x_aFcY y_aFcZ) Double
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_max_radius :: Lens' (AreaSpots z_aDbS x_aDbT y_aDbU) Double
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_max_radius :: Lens' (AreaSpots z_aFcX x_aFcY y_aFcZ) Double
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_opacity :: Lens' (AreaSpots z_aDbS x_aDbT y_aDbU) Double
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_opacity :: Lens' (AreaSpots z_aFcX x_aFcY y_aFcZ) Double
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_title :: Lens' (AreaSpots z_aDbS x_aDbT y_aDbU) String
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_title :: Lens' (AreaSpots z_aFcX x_aFcY y_aFcZ) String
- Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_values :: Lens (AreaSpots z_aDbS x_aDbT y_aDbU) (AreaSpots z_aDoX x_aDoY y_aDoZ) [(x_aDbT, y_aDbU, z_aDbS)] [(x_aDoY, y_aDoZ, z_aDoX)]
+ Graphics.Rendering.Chart.Plot.AreaSpots: area_spots_values :: Lens (AreaSpots z_aFcX x_aFcY y_aFcZ) (AreaSpots z_aFpC x_aFpD y_aFpE) [(x_aFcY, y_aFcZ, z_aFcX)] [(x_aFpD, y_aFpE, z_aFpC)]
- Graphics.Rendering.Chart.Plot.Bars: plot_bars_alignment :: Lens' (PlotBars x_aB20 y_aB21) PlotBarsAlignment
+ Graphics.Rendering.Chart.Plot.Bars: plot_bars_alignment :: Lens' (PlotBars x_aD4f y_aD4g) PlotBarsAlignment
- Graphics.Rendering.Chart.Plot.Bars: plot_bars_item_styles :: Lens' (PlotBars x_aB20 y_aB21) [(FillStyle, Maybe LineStyle)]
+ Graphics.Rendering.Chart.Plot.Bars: plot_bars_item_styles :: Lens' (PlotBars x_aD4f y_aD4g) [(FillStyle, Maybe LineStyle)]
- Graphics.Rendering.Chart.Plot.Bars: plot_bars_reference :: Lens' (PlotBars x_aB20 y_aB21) y_aB21
+ Graphics.Rendering.Chart.Plot.Bars: plot_bars_reference :: Lens' (PlotBars x_aD4f y_aD4g) y_aD4g
- Graphics.Rendering.Chart.Plot.Bars: plot_bars_singleton_width :: Lens' (PlotBars x_aB20 y_aB21) Double
+ Graphics.Rendering.Chart.Plot.Bars: plot_bars_singleton_width :: Lens' (PlotBars x_aD4f y_aD4g) Double
- Graphics.Rendering.Chart.Plot.Bars: plot_bars_spacing :: Lens' (PlotBars x_aB20 y_aB21) PlotBarsSpacing
+ Graphics.Rendering.Chart.Plot.Bars: plot_bars_spacing :: Lens' (PlotBars x_aD4f y_aD4g) PlotBarsSpacing
- Graphics.Rendering.Chart.Plot.Bars: plot_bars_style :: Lens' (PlotBars x_aB20 y_aB21) PlotBarsStyle
+ Graphics.Rendering.Chart.Plot.Bars: plot_bars_style :: Lens' (PlotBars x_aD4f y_aD4g) PlotBarsStyle
- Graphics.Rendering.Chart.Plot.Bars: plot_bars_titles :: Lens' (PlotBars x_aB20 y_aB21) [String]
+ Graphics.Rendering.Chart.Plot.Bars: plot_bars_titles :: Lens' (PlotBars x_aD4f y_aD4g) [String]
- Graphics.Rendering.Chart.Plot.Bars: plot_bars_values :: Lens (PlotBars x_aB20 y_aB21) (PlotBars x_aBa4 y_aB21) [(x_aB20, [y_aB21])] [(x_aBa4, [y_aB21])]
+ Graphics.Rendering.Chart.Plot.Bars: plot_bars_values :: Lens (PlotBars x_aD4f y_aD4g) (PlotBars x_aDcd y_aD4g) [(x_aD4f, [y_aD4g])] [(x_aDcd, [y_aD4g])]
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_centre :: Lens' (PlotCandle x_azir y_azis) Double
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_centre :: Lens' (PlotCandle x_aBla y_aBlb) Double
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_fall_fill_style :: Lens' (PlotCandle x_azir y_azis) FillStyle
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_fall_fill_style :: Lens' (PlotCandle x_aBla y_aBlb) FillStyle
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_fill :: Lens' (PlotCandle x_azir y_azis) Bool
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_fill :: Lens' (PlotCandle x_aBla y_aBlb) Bool
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_line_style :: Lens' (PlotCandle x_azir y_azis) LineStyle
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_line_style :: Lens' (PlotCandle x_aBla y_aBlb) LineStyle
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_rise_fill_style :: Lens' (PlotCandle x_azir y_azis) FillStyle
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_rise_fill_style :: Lens' (PlotCandle x_aBla y_aBlb) FillStyle
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_tick_length :: Lens' (PlotCandle x_azir y_azis) Double
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_tick_length :: Lens' (PlotCandle x_aBla y_aBlb) Double
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_title :: Lens' (PlotCandle x_azir y_azis) String
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_title :: Lens' (PlotCandle x_aBla y_aBlb) String
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_values :: Lens (PlotCandle x_azir y_azis) (PlotCandle x_azoO y_azoP) [Candle x_azir y_azis] [Candle x_azoO y_azoP]
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_values :: Lens (PlotCandle x_aBla y_aBlb) (PlotCandle x_aBrs y_aBrt) [Candle x_aBla y_aBlb] [Candle x_aBrs y_aBrt]
- Graphics.Rendering.Chart.Plot.Candle: plot_candle_width :: Lens' (PlotCandle x_azir y_azis) Double
+ Graphics.Rendering.Chart.Plot.Candle: plot_candle_width :: Lens' (PlotCandle x_aBla y_aBlb) Double
- Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_line_style :: Lens' (PlotErrBars x_axVV y_axVW) LineStyle
+ Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_line_style :: Lens' (PlotErrBars x_azYA y_azYB) LineStyle
- Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_overhang :: Lens' (PlotErrBars x_axVV y_axVW) Double
+ Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_overhang :: Lens' (PlotErrBars x_azYA y_azYB) Double
- Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_tick_length :: Lens' (PlotErrBars x_axVV y_axVW) Double
+ Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_tick_length :: Lens' (PlotErrBars x_azYA y_azYB) Double
- Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_title :: Lens' (PlotErrBars x_axVV y_axVW) String
+ Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_title :: Lens' (PlotErrBars x_azYA y_azYB) String
- Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_values :: Lens (PlotErrBars x_axVV y_axVW) (PlotErrBars x_ay1i y_ay1j) [ErrPoint x_axVV y_axVW] [ErrPoint x_ay1i y_ay1j]
+ Graphics.Rendering.Chart.Plot.ErrBars: plot_errbars_values :: Lens (PlotErrBars x_azYA y_azYB) (PlotErrBars x_aA4m y_aA4n) [ErrPoint x_azYA y_azYB] [ErrPoint x_aA4m y_aA4n]
- Graphics.Rendering.Chart.Plot.FillBetween: plot_fillbetween_style :: Lens' (PlotFillBetween x_axrf y_axrg) FillStyle
+ Graphics.Rendering.Chart.Plot.FillBetween: plot_fillbetween_style :: Lens' (PlotFillBetween x_azuo y_azup) FillStyle
- Graphics.Rendering.Chart.Plot.FillBetween: plot_fillbetween_title :: Lens' (PlotFillBetween x_axrf y_axrg) String
+ Graphics.Rendering.Chart.Plot.FillBetween: plot_fillbetween_title :: Lens' (PlotFillBetween x_azuo y_azup) String
- Graphics.Rendering.Chart.Plot.FillBetween: plot_fillbetween_values :: Lens (PlotFillBetween x_axrf y_axrg) (PlotFillBetween x_axt5 y_axt6) [(x_axrf, (y_axrg, y_axrg))] [(x_axt5, (y_axt6, y_axt6))]
+ Graphics.Rendering.Chart.Plot.FillBetween: plot_fillbetween_values :: Lens (PlotFillBetween x_azuo y_azup) (PlotFillBetween x_azw9 y_azwa) [(x_azuo, (y_azup, y_azup))] [(x_azw9, (y_azwa, y_azwa))]
- Graphics.Rendering.Chart.Plot.Hidden: plot_hidden_x_values :: Lens (PlotHidden x_awrh y_awri) (PlotHidden x_awrL y_awri) [x_awrh] [x_awrL]
+ Graphics.Rendering.Chart.Plot.Hidden: plot_hidden_x_values :: Lens (PlotHidden x_awAJ y_awAK) (PlotHidden x_awBd y_awAK) [x_awAJ] [x_awBd]
- Graphics.Rendering.Chart.Plot.Hidden: plot_hidden_y_values :: Lens (PlotHidden x_awrh y_awri) (PlotHidden x_awrh y_awrQ) [y_awri] [y_awrQ]
+ Graphics.Rendering.Chart.Plot.Hidden: plot_hidden_y_values :: Lens (PlotHidden x_awAJ y_awAK) (PlotHidden x_awAJ y_awBi) [y_awAK] [y_awBi]
- Graphics.Rendering.Chart.Plot.Lines: plot_lines_limit_values :: Lens' (PlotLines x_awyp y_awyq) [[(Limit x_awyp, Limit y_awyq)]]
+ Graphics.Rendering.Chart.Plot.Lines: plot_lines_limit_values :: Lens' (PlotLines x_awHQ y_awHR) [[(Limit x_awHQ, Limit y_awHR)]]
- Graphics.Rendering.Chart.Plot.Lines: plot_lines_style :: Lens' (PlotLines x_awyp y_awyq) LineStyle
+ Graphics.Rendering.Chart.Plot.Lines: plot_lines_style :: Lens' (PlotLines x_awHQ y_awHR) LineStyle
- Graphics.Rendering.Chart.Plot.Lines: plot_lines_title :: Lens' (PlotLines x_awyp y_awyq) String
+ Graphics.Rendering.Chart.Plot.Lines: plot_lines_title :: Lens' (PlotLines x_awHQ y_awHR) String
- Graphics.Rendering.Chart.Plot.Lines: plot_lines_values :: Lens' (PlotLines x_awyp y_awyq) [[(x_awyp, y_awyq)]]
+ Graphics.Rendering.Chart.Plot.Lines: plot_lines_values :: Lens' (PlotLines x_awHQ y_awHR) [[(x_awHQ, y_awHR)]]
- Graphics.Rendering.Chart.Plot.Points: plot_points_style :: Lens' (PlotPoints x_ax7S y_ax7T) PointStyle
+ Graphics.Rendering.Chart.Plot.Points: plot_points_style :: Lens' (PlotPoints x_azbv y_azbw) PointStyle
- Graphics.Rendering.Chart.Plot.Points: plot_points_title :: Lens' (PlotPoints x_ax7S y_ax7T) String
+ Graphics.Rendering.Chart.Plot.Points: plot_points_title :: Lens' (PlotPoints x_azbv y_azbw) String
- Graphics.Rendering.Chart.Plot.Points: plot_points_values :: Lens (PlotPoints x_ax7S y_ax7T) (PlotPoints x_ax9u y_ax9v) [(x_ax7S, y_ax7T)] [(x_ax9u, y_ax9v)]
+ Graphics.Rendering.Chart.Plot.Points: plot_points_values :: Lens (PlotPoints x_azbv y_azbw) (PlotPoints x_azd2 y_azd3) [(x_azbv, y_azbw)] [(x_azd2, y_azd3)]
- Graphics.Rendering.Chart.Plot.Types: plot_all_points :: Lens' (Plot x_aweJ y_aweK) ([x_aweJ], [y_aweK])
+ Graphics.Rendering.Chart.Plot.Types: plot_all_points :: Lens' (Plot x_awnv y_awnw) ([x_awnv], [y_awnw])
- Graphics.Rendering.Chart.Plot.Types: plot_legend :: Lens' (Plot x_aweJ y_aweK) [(String, Rect -> ChartBackend ())]
+ Graphics.Rendering.Chart.Plot.Types: plot_legend :: Lens' (Plot x_awnv y_awnw) [(String, Rect -> ChartBackend ())]
- Graphics.Rendering.Chart.Plot.Types: plot_render :: Lens' (Plot x_aweJ y_aweK) (PointMapFn x_aweJ y_aweK -> ChartBackend ())
+ Graphics.Rendering.Chart.Plot.Types: plot_render :: Lens' (Plot x_awnv y_awnw) (PointMapFn x_awnv y_awnw -> ChartBackend ())

Files

Chart.cabal view
@@ -1,5 +1,5 @@ Name: Chart-Version: 1.2.4+Version: 1.3 License: BSD3 License-file: LICENSE Copyright: Tim Docker, 2006-2010@@ -22,6 +22,7 @@                , lens >= 3.9 && < 4.4                , colour >= 2.2.1 && < 2.4                , data-default-class < 0.1+               , mtl >= 2.0 && < 2.3                , operational >= 0.2.2 && < 0.3    Ghc-options: -Wall -fno-warn-orphans@@ -52,12 +53,15 @@         Graphics.Rendering.Chart.Plot.FillBetween,         Graphics.Rendering.Chart.Plot.Hidden,         Graphics.Rendering.Chart.Plot.Lines,+        Graphics.Rendering.Chart.Plot.Vectors,         Graphics.Rendering.Chart.Plot.Pie,         Graphics.Rendering.Chart.Plot.Points         Graphics.Rendering.Chart.SparkLine         Graphics.Rendering.Chart.Backend         Graphics.Rendering.Chart.Backend.Impl         Graphics.Rendering.Chart.Backend.Types+        Graphics.Rendering.Chart.Easy,+        Graphics.Rendering.Chart.State  source-repository head   type:     git
Graphics/Rendering/Chart.hs view
@@ -43,6 +43,7 @@     module Graphics.Rendering.Chart.Axis,     module Graphics.Rendering.Chart.Plot,     module Graphics.Rendering.Chart.Legend,+    module Graphics.Rendering.Chart.Backend.Types  ) where @@ -53,3 +54,4 @@ import Graphics.Rendering.Chart.Axis import Graphics.Rendering.Chart.Plot import Graphics.Rendering.Chart.Legend+import Graphics.Rendering.Chart.Backend.Types
Graphics/Rendering/Chart/Axis/Floating.hs view
@@ -16,8 +16,6 @@     LinearAxisParams(..),     LogValue(..),     LogAxisParams(..),-    defaultLinearAxis,-    defaultLogAxis,     scaledAxis,     autoScaledAxis,     autoScaledLogAxis,@@ -46,7 +44,7 @@ instance PlotValue Double where     toValue  = id     fromValue= id-    autoAxis = autoScaledAxis defaultLinearAxis+    autoAxis = autoScaledAxis def  -- | A wrapper class for doubles used to indicate they are to -- be plotted against a percentage axis.@@ -59,7 +57,7 @@ instance PlotValue Percent where     toValue  = unPercent     fromValue= Percent-    autoAxis = autoScaledAxis defaultLinearAxis{-_la_labelf=-}+    autoAxis = autoScaledAxis def {-_la_labelf=-}  -- | A wrapper class for doubles used to indicate they are to -- be plotted against a log axis.@@ -72,7 +70,7 @@ instance PlotValue LogValue where     toValue (LogValue x) = log x     fromValue d          = LogValue (exp d)-    autoAxis             = autoScaledLogAxis defaultLogAxis+    autoAxis             = autoScaledLogAxis def  showD :: (RealFloat d) => d -> String showD x = case reverse $ showFFloat Nothing x "" of@@ -90,10 +88,6 @@     _la_nTicks  :: Int } -{-# DEPRECATED defaultLinearAxis "Use the according Data.Default instance!" #-}-defaultLinearAxis :: (Show a, RealFloat a) => LinearAxisParams a-defaultLinearAxis = def- instance (Show a, RealFloat a) => Default (LinearAxisParams a) where   def = LinearAxisParams      { _la_labelf    = showD@@ -154,10 +148,6 @@     r         = range ps  ------------------------------------------------------------------------{-# DEPRECATED defaultLogAxis "Use the according Data.Default instance!" #-}-defaultLogAxis :: (Show a, RealFloat a) => LogAxisParams a-defaultLogAxis = def  instance (Show a, RealFloat a) => Default (LogAxisParams a) where   def = LogAxisParams 
Graphics/Rendering/Chart/Axis/Types.hs view
@@ -18,7 +18,6 @@     AxisFn,      defaultAxisLineStyle,-    defaultAxisStyle,     defaultGridLineStyle,      makeAxis,@@ -395,10 +394,6 @@ -- | The default 'LineStyle' of a plot area grid. defaultGridLineStyle :: LineStyle defaultGridLineStyle = dashedLine 1 [5,5] $ opaque lightgrey--{-# DEPRECATED defaultAxisStyle "Use the according Data.Default instance!" #-}-defaultAxisStyle :: AxisStyle-defaultAxisStyle = def  instance Default AxisStyle where   def = AxisStyle 
Graphics/Rendering/Chart/Backend.hs view
@@ -11,7 +11,6 @@   (   -- * The backend Monad     ChartBackend-  , CRender      -- * Backend Operations   , fillPath@@ -49,8 +48,6 @@   , FontSlant(..)   , FontStyle(..) -  , defaultFontStyle-     , HTextAnchor(..)   , VTextAnchor(..) 
Graphics/Rendering/Chart/Backend/Impl.hs view
@@ -64,10 +64,6 @@ --   found in the documentation of 'ChartBackendInstr'. type ChartBackend a = Program ChartBackendInstr a -{-# DEPRECATED CRender  "Use the new name ChartBackend!" #-}--- | Alias so the old name for rendering code still works.-type CRender a = ChartBackend a- -- | Stroke the outline of the given path using the  --   current 'LineStyle'. This function does /not/ perform --   alignment operations on the path. See 'Path' for the exact semantic
Graphics/Rendering/Chart/Backend/Types.hs view
@@ -105,11 +105,6 @@     , _font_color  = opaque black     } -{-# DEPRECATED defaultFontStyle  "Use the according Data.Default instance!" #-}--- | The default font style.-defaultFontStyle :: FontStyle-defaultFontStyle = def- -- | Possible horizontal anchor points for text. data HTextAnchor = HTA_Left                   | HTA_Centre @@ -141,12 +136,12 @@ --   The contained action sets the required fill --   style in the rendering state. newtype FillStyle = FillStyleSolid -  { _fill_colour :: AlphaColour Double +  { _fill_color :: AlphaColour Double    } deriving (Show, Eq)  -- | The default fill style. instance Default FillStyle where-  def = FillStyleSolid { _fill_colour = opaque white }+  def = FillStyleSolid { _fill_color = opaque white }  ------------------------------------------------------------------------- @@ -190,4 +185,5 @@  $( makeLenses ''LineStyle ) $( makeLenses ''FontStyle )+$( makeLenses ''FillStyle ) 
Graphics/Rendering/Chart/Drawing.hs view
@@ -27,7 +27,6 @@     PointShape(..)   , PointStyle(..)   , drawPoint-  , defaultPointStyle      -- * Alignments and Paths   , alignPath@@ -70,6 +69,7 @@   , plusses   , exes   , stars+  , arrows        , solidFillStyle   @@ -331,6 +331,7 @@                 | PointShapePlus  -- ^ A plus sign.                 | PointShapeCross -- ^ A cross.                 | PointShapeStar  -- ^ Combination of a cross and a plus.+                | PointShapeArrowHead Double  -- | Abstract data type for the style of a plotted point. data PointStyle = PointStyle@@ -356,16 +357,11 @@     , _point_shape        = PointShapeCircle     } -{-# DEPRECATED defaultPointStyle "Use the according Data.Default instance!" #-}--- | Default style for points.-defaultPointStyle :: PointStyle-defaultPointStyle = def- -- | Draw a single point at the given location. drawPoint :: PointStyle  -- ^ Style to use when rendering the point.           -> Point       -- ^ Position of the point to render.           -> ChartBackend ()-drawPoint ps@(PointStyle _ _ _ r shape) p = withPointStyle ps $ do+drawPoint ps@(PointStyle cl _ _ r shape) p = withPointStyle ps $ do   p'@(Point x y) <- alignStrokePoint p   case shape of     PointShapeCircle -> do@@ -383,6 +379,9 @@       let path = G.moveTo p1 <> mconcat (map lineTo p1s) <> lineTo p1       fillPath path       strokePath path+    PointShapeArrowHead theta ->+      withTranslation p $ withRotation (theta - pi/2) $+          drawPoint (filledPolygon r 3 True cl) (Point 0 0)     PointShapePlus ->        strokePath $ moveTo' (x+r) y                 <> lineTo' (x-r) y@@ -484,6 +483,14 @@       -> PointStyle stars radius w cl =   PointStyle transparent cl w radius PointShapeStar++arrows :: Double -- ^ Radius of circle.+       -> Double -- ^ Rotation (Tau)+       -> Double -- ^ Thickness of line.+       -> AlphaColour Double -- ^ Color of line.+       -> PointStyle+arrows radius angle w cl =+  PointStyle transparent cl w radius (PointShapeArrowHead angle)  -- | Fill style that fill everything this the given colour. solidFillStyle :: AlphaColour Double -> FillStyle
+ Graphics/Rendering/Chart/Easy.hs view
@@ -0,0 +1,77 @@+{-# LANGUAGE ScopedTypeVariables, TemplateHaskell, TypeSynonymInstances, FlexibleInstances #-}+----------------------------------------------------------------------------+-- |+-- Module      :  Graphics.Rendering.Chart.Easy+-- Copyright   :  (c) Tim Docker 2014+-- License     :  BSD-style (see chart/COPYRIGHT)+--+-- Importing the Easy module brings into scope all core functions and types required+-- for working with the chart library. This includes key external dependencies such as+-- Control.Len and Data.Colour. The module also provides several helper functions for+-- quickly generating common plots.+--+-- Note that chart backends must still be explicitly imported, as some backends cannot+-- be built on all platforms.++module Graphics.Rendering.Chart.Easy(++  module Control.Lens,+  module Data.Default.Class,+  module Data.Colour,+  module Data.Colour.Names,++  module Graphics.Rendering.Chart,+  module Graphics.Rendering.Chart.State,++  line,+  points,+  bars,+  setColors,+  +  ) where++import Control.Lens+import Data.Default.Class+import Data.Colour hiding (over) -- overlaps with lens over function+import Data.Colour.Names+import Graphics.Rendering.Chart+import Graphics.Rendering.Chart.State++-- | Set the contents of the colour source, for+-- subsequent plots+setColors :: [AlphaColour Double] -> EC l ()+setColors cs = liftCState $ colors .= cycle cs++-- | Constuct a line plot with the given title and+-- data, using the next available color.+line :: String -> [[(x,y)]]  -> EC l (PlotLines x y)+line title values = liftEC $ do+    color <- takeColor+    plot_lines_title .= title+    plot_lines_values .= values+    plot_lines_style . line_color .= color++-- | Construct a scatter plot with the given title and data, using the+-- next available color and point shape.+points :: String -> [(x,y)]  -> EC l (PlotPoints x y)+points title values = liftEC $ do+    color <- takeColor+    shape <- takeShape+    plot_points_values .= values+    plot_points_title .= title+    plot_points_style . point_color .= color+    plot_points_style . point_shape .= shape+    plot_points_style . point_radius .= 2++-- | Construct a bar chart with the given titles and data, using the+-- next available colors    +bars :: (PlotValue x, BarsPlotValue y) => [String] -> [(x,[y])] -> EC l (PlotBars x y)+bars titles vals = liftEC $ do+    styles <- sequence [fmap mkStyle takeColor | _ <- titles]+    plot_bars_titles .= titles+    plot_bars_values .= vals+    plot_bars_style .= BarsClustered+    plot_bars_spacing .= BarsFixGap 30 5+    plot_bars_item_styles .= styles+  where+    mkStyle c = (solidFillStyle c, Just (solidLine 1.0 $ opaque black))
Graphics/Rendering/Chart/Geometry.hs view
@@ -20,6 +20,8 @@   , pvadd   , pvsub   , psub+  , vangle+  , vlen   , vscale   , within   , intersectRect@@ -49,8 +51,14 @@   , invert   ) where +import qualified Prelude+import Prelude hiding ((^)) import Data.Monoid +-- The homomorphic version to avoid casts inside the code.+(^) :: Num a => a -> Integer -> a+(^) = (Prelude.^)+ -- | A point in two dimensions. data Point = Point {     p_x :: Double,@@ -66,6 +74,17 @@ -- | Convert a 'Point' to a 'Vector'. pointToVec :: Point -> Vector pointToVec (Point x y) = Vector x y++-- | Angle of a vector (counterclockwise from positive x-axis)+vangle :: Vector -> Double+vangle (Vector x y)+    | x > 0 = atan (y/x)+    | x < 0 = atan (y/x) + pi+    | otherwise = if y > 0 then pi/2 else -pi/2++-- | Length/magnitude of a vector+vlen :: Vector -> Double+vlen (Vector x y) = sqrt $ x^2 + y^2  -- | Scale a vector by a constant. vscale :: Double -> Vector -> Vector
Graphics/Rendering/Chart/Layout.hs view
@@ -43,12 +43,6 @@   , layoutToRenderable   , layoutLRToRenderable -  , setLayoutForeground-  , updateAllAxesStyles-  , setLayoutLRForeground-  , updateAllAxesStylesLR--  , defaultLayoutAxis   , laxis_title_style   , laxis_title   , laxis_style@@ -70,6 +64,11 @@   , layout_plots   , layout_legend   , layout_grid_last++  , layout_axes_styles+  , layout_axes_title_styles+  , layout_all_font_styles+  , layout_foreground          , layoutlr_background   , layoutlr_plot_background@@ -87,7 +86,11 @@   , layoutlr_margin   , layoutlr_grid_last -  , defaultStackedLayouts+  , layoutlr_axes_styles+  , layoutlr_axes_title_styles+  , layoutlr_all_font_styles+  , layoutlr_foreground+   , slayouts_layouts   , slayouts_compress_legend @@ -485,10 +488,6 @@     -- ^ If the different legends shall be combined in one legend at the bottom.   } -{-# DEPRECATED defaultStackedLayouts  "Use the according Data.Default instance!" #-}-defaultStackedLayouts :: StackedLayouts x-defaultStackedLayouts = def- -- | A empty 'StackedLayout' with compressions applied. instance Default (StackedLayouts x) where   def = StackedLayouts [] True@@ -762,10 +761,6 @@     , _layoutlr_grid_last       = False     } -{-# DEPRECATED defaultLayoutAxis "Use the according Data.Default instance!" #-}-defaultLayoutAxis :: PlotValue t => LayoutAxis t-defaultLayoutAxis = def- instance PlotValue t => Default (LayoutAxis t) where   def = LayoutAxis     { _laxis_title_style = def { _font_size=10 }@@ -784,29 +779,59 @@ $( makeLenses ''LayoutAxis ) $( makeLenses ''StackedLayouts ) --- | Helper to update all axis styles on a Layout1 simultaneously.-updateAllAxesStyles :: (AxisStyle -> AxisStyle) -> Layout x y -> Layout x y-updateAllAxesStyles uf = (layout_x_axis . laxis_style %~ uf) .-                         (layout_y_axis . laxis_style %~ uf)+-- | Setter to update all axis styles on a `Layout`+layout_axes_styles :: Setter' (Layout x y) AxisStyle+layout_axes_styles = sets $ \af -> +    (layout_x_axis . laxis_style %~ af) .+    (layout_y_axis . laxis_style %~ af)  --- | Helper to update all axis styles on a LayoutLR simultaneously.-updateAllAxesStylesLR :: (AxisStyle -> AxisStyle) -> LayoutLR x yl yr -> LayoutLR x yl yr-updateAllAxesStylesLR uf = (layoutlr_x_axis       . laxis_style %~ uf)-                         . (layoutlr_left_axis  . laxis_style %~ uf)-                         . (layoutlr_right_axis . laxis_style %~ uf)+-- | Setter to update all the axes title styles on a `Layout`+layout_axes_title_styles :: Setter' (Layout x y) FontStyle+layout_axes_title_styles = sets $ \af -> +    (layout_x_axis . laxis_title_style %~ af) .+    (layout_y_axis . laxis_title_style %~ af) --- | Helper to set the forground color uniformly on a Layout.-setLayoutForeground :: AlphaColour Double -> Layout x y -> Layout x y-setLayoutForeground fg =-    updateAllAxesStyles  ( (axis_line_style  . line_color .~ fg)-                         . (axis_label_style . font_color .~ fg))-                         . (layout_title_style . font_color .~ fg)-                         . (layout_legend %~ fmap (legend_label_style .> font_color .~ fg))+-- | Setter to update all the font styles on a `Layout`+layout_all_font_styles :: Setter' (Layout x y) FontStyle+layout_all_font_styles = sets $ \af -> +    (layout_axes_title_styles %~ af) .+    (layout_x_axis . laxis_style . axis_label_style %~ af) .+    (layout_y_axis . laxis_style . axis_label_style %~ af) .+    (layout_legend . _Just . legend_label_style %~ af) .+    (layout_title_style %~ af) --- | Helper to set the forground color uniformly on a LayoutLR.-setLayoutLRForeground :: AlphaColour Double -> LayoutLR x yl yr -> LayoutLR x yl yr-setLayoutLRForeground fg = updateAllAxesStylesLR -  ( (axis_line_style  . line_color .~ fg)-  . (axis_label_style . font_color .~ fg))-  . (layoutlr_title_style . font_color .~ fg)-  . (layoutlr_legend %~ fmap (legend_label_style .> font_color .~ fg))+-- | Setter to update the foreground color of core chart elements on a `Layout`+layout_foreground ::  Setter' (Layout x y) (AlphaColour Double)+layout_foreground = sets $ \af ->+    (layout_all_font_styles . font_color %~ af) .+    (layout_axes_styles . axis_line_style . line_color %~ af) ++-- | Setter to update all axis styles on a `LayoutLR`+layoutlr_axes_styles :: Setter' (LayoutLR x y1 y2) AxisStyle+layoutlr_axes_styles = sets $ \af -> +    (layoutlr_x_axis . laxis_style %~ af) .+    (layoutlr_left_axis . laxis_style %~ af) .+    (layoutlr_right_axis . laxis_style %~ af)++-- | Setter to update all the axes title styles on a `LayoutLR`+layoutlr_axes_title_styles :: Setter' (LayoutLR x y1 y2) FontStyle+layoutlr_axes_title_styles = sets $ \af -> +    (layoutlr_x_axis . laxis_title_style %~ af) .+    (layoutlr_left_axis . laxis_title_style %~ af) .+    (layoutlr_right_axis . laxis_title_style %~ af)++-- | Setter to update all the font styles on a `LayoutLR`+layoutlr_all_font_styles :: Setter' (LayoutLR x y1 y2) FontStyle+layoutlr_all_font_styles = sets $ \af -> +    (layoutlr_axes_title_styles %~ af) .+    (layoutlr_x_axis . laxis_style . axis_label_style %~ af) .+    (layoutlr_left_axis . laxis_style . axis_label_style %~ af) .+    (layoutlr_right_axis . laxis_style . axis_label_style %~ af) .+    (layoutlr_legend . _Just . legend_label_style %~ af) .+    (layoutlr_title_style %~ af)++-- | Setter to update the foreground color of core chart elements on a `LayoutLR`+layoutlr_foreground ::  Setter' (LayoutLR x y1 y2) (AlphaColour Double)+layoutlr_foreground = sets $ \af ->+    (layoutlr_all_font_styles . font_color %~ af) .+    (layoutlr_axes_styles . axis_line_style . line_color %~ af) 
Graphics/Rendering/Chart/Legend.hs view
@@ -12,7 +12,6 @@     Legend(..),     LegendStyle(..),     LegendOrientation(..),-    defaultLegendStyle,     legendToRenderable,     legend_label_style,     legend_margin,@@ -89,10 +88,6 @@ join_nub ((x,a1):ys) = case partition ((==x) . fst) ys of                          (xs, rest) -> (x, a1:map snd xs) : join_nub rest join_nub []          = []--{-# DEPRECATED defaultLegendStyle  "Use the according Data.Default instance!" #-}-defaultLegendStyle :: LegendStyle-defaultLegendStyle = def  instance Default LegendStyle where   def = LegendStyle 
Graphics/Rendering/Chart/Plot.hs view
@@ -10,6 +10,7 @@ module Graphics.Rendering.Chart.Plot(     module Graphics.Rendering.Chart.Plot.Types,     module Graphics.Rendering.Chart.Plot.Lines,+    module Graphics.Rendering.Chart.Plot.Vectors,     module Graphics.Rendering.Chart.Plot.Points,     module Graphics.Rendering.Chart.Plot.FillBetween,     module Graphics.Rendering.Chart.Plot.ErrBars,@@ -23,6 +24,7 @@  import Graphics.Rendering.Chart.Plot.Types import Graphics.Rendering.Chart.Plot.Lines+import Graphics.Rendering.Chart.Plot.Vectors import Graphics.Rendering.Chart.Plot.Points import Graphics.Rendering.Chart.Plot.FillBetween import Graphics.Rendering.Chart.Plot.ErrBars
Graphics/Rendering/Chart/Plot/Annotation.hs view
@@ -10,7 +10,6 @@  module Graphics.Rendering.Chart.Plot.Annotation(     PlotAnnotation(..),-    defaultPlotAnnotation,      plot_annotation_hanchor,     plot_annotation_vanchor,@@ -59,10 +58,6 @@           style =  _plot_annotation_style p           drawOne (x,y,s) = drawTextsR hta vta angle point s               where point = pMap (LValue x, LValue y)--{-# DEPRECATED defaultPlotAnnotation  "Use the according Data.Default instance!" #-}-defaultPlotAnnotation :: PlotAnnotation x y-defaultPlotAnnotation = def  instance Default (PlotAnnotation x y) where   def = PlotAnnotation 
Graphics/Rendering/Chart/Plot/AreaSpots.hs view
@@ -11,7 +11,6 @@  module Graphics.Rendering.Chart.Plot.AreaSpots   ( AreaSpots(..)-  , defaultAreaSpots    , area_spots_title   , area_spots_linethick@@ -22,7 +21,6 @@   , area_spots_values    , AreaSpots4D(..)-  , defaultAreaSpots4D    , area_spots_4d_title   , area_spots_4d_linethick@@ -55,10 +53,6 @@   , _area_spots_values     :: [(x,y,z)]   } -{-# DEPRECATED defaultAreaSpots "Use the according Data.Default instance!" #-}-defaultAreaSpots :: AreaSpots z x y-defaultAreaSpots = def- instance Default (AreaSpots z x y) where   def = AreaSpots     { _area_spots_title      = ""@@ -127,10 +121,6 @@   , _area_spots_4d_max_radius :: Double	-- ^ the largest size of spot   , _area_spots_4d_values     :: [(x,y,z,t)]   }--{-# DEPRECATED defaultAreaSpots4D "Use the according Data.Default instance!" #-}-defaultAreaSpots4D :: AreaSpots4D z t x y-defaultAreaSpots4D = def  instance Default (AreaSpots4D z t x y) where   def = AreaSpots4D
Graphics/Rendering/Chart/Plot/Bars.hs view
@@ -10,7 +10,6 @@  module Graphics.Rendering.Chart.Plot.Bars(     PlotBars(..),-    defaultPlotBars,     PlotBarsStyle(..),     PlotBarsSpacing(..),     PlotBarsAlignment(..),@@ -105,10 +104,6 @@    -- | The actual points to be plotted.    _plot_bars_values          :: [ (x,[y]) ] }--{-# DEPRECATED defaultPlotBars "Use the according Data.Default instance!" #-}-defaultPlotBars :: BarsPlotValue y => PlotBars x y-defaultPlotBars = def  instance BarsPlotValue y => Default (PlotBars x y) where   def = PlotBars
Graphics/Rendering/Chart/Plot/Candle.hs view
@@ -11,7 +11,6 @@ module Graphics.Rendering.Chart.Plot.Candle(     PlotCandle(..),     Candle(..),-    defaultPlotCandle,      plot_candle_title,     plot_candle_line_style,@@ -136,10 +135,6 @@     hi    = min (p_y p1) (p_y p2)     open  = (lo + mid) / 2     close = (mid + hi) / 2--{-# DEPRECATED defaultPlotCandle "Use the according Data.Default instance!" #-}-defaultPlotCandle :: PlotCandle x y-defaultPlotCandle = def  instance Default (PlotCandle x y) where   def = PlotCandle 
Graphics/Rendering/Chart/Plot/ErrBars.hs view
@@ -10,7 +10,6 @@  module Graphics.Rendering.Chart.Plot.ErrBars(     PlotErrBars(..),-    defaultPlotErrBars,     ErrPoint(..),     ErrValue(..),     symErrPoint,@@ -116,10 +115,6 @@     drawErrBar = drawErrBar0 p     dx         = min ((p_x p2 - p_x p1)/6) ((p_y p2 - p_y p1)/2)     y          = (p_y p1 + p_y p2)/2--{-# DEPRECATED defaultPlotErrBars "Use the according Data.Default instance!" #-}-defaultPlotErrBars :: PlotErrBars x y-defaultPlotErrBars = def  instance Default (PlotErrBars x y) where   def = PlotErrBars 
Graphics/Rendering/Chart/Plot/FillBetween.hs view
@@ -10,7 +10,6 @@  module Graphics.Rendering.Chart.Plot.FillBetween(     PlotFillBetween(..),-    defaultPlotFillBetween,      -- * Accessors     -- | These accessors are generated by template haskell@@ -73,10 +72,6 @@                              , concat [ [y1,y2] | (_,(y1,y2)) <- pts ] )   where     pts = _plot_fillbetween_values p--{-# DEPRECATED defaultPlotFillBetween "Use the according Data.Default instance!" #-}-defaultPlotFillBetween :: PlotFillBetween x y-defaultPlotFillBetween = def   instance Default (PlotFillBetween x y) where   def = PlotFillBetween 
Graphics/Rendering/Chart/Plot/Lines.hs view
@@ -10,7 +10,6 @@  module Graphics.Rendering.Chart.Plot.Lines(     PlotLines(..),-    defaultPlotLines,     defaultPlotLineStyle,     hlinePlot,     vlinePlot,@@ -76,10 +75,6 @@      _line_join = LineJoinRound  } -{-# DEPRECATED defaultPlotLines "Use the according Data.Default instance!" #-}-defaultPlotLines :: PlotLines x y-defaultPlotLines = def- instance Default (PlotLines x y) where   def = PlotLines      { _plot_lines_title        = ""@@ -90,7 +85,7 @@  -- | Helper function to plot a single horizontal line. hlinePlot :: String -> LineStyle -> b -> Plot a b-hlinePlot t ls v = toPlot defaultPlotLines {+hlinePlot t ls v = toPlot def {     _plot_lines_title        = t,     _plot_lines_style        = ls,     _plot_lines_limit_values = [[(LMin, LValue v),(LMax, LValue v)]]@@ -98,7 +93,7 @@  -- | Helper function to plot a single vertical line. vlinePlot :: String -> LineStyle -> a -> Plot a b-vlinePlot t ls v = toPlot defaultPlotLines {+vlinePlot t ls v = toPlot def {     _plot_lines_title        = t,     _plot_lines_style        = ls,     _plot_lines_limit_values = [[(LValue v,LMin),(LValue v,LMax)]]
Graphics/Rendering/Chart/Plot/Pie.hs view
@@ -24,9 +24,6 @@     PieLayout(..),
     PieChart(..),
     PieItem(..),
-    defaultPieLayout,
-    defaultPieChart,
-    defaultPieItem,
     
     pieToRenderable,
     pieChartToRenderable,
@@ -86,10 +83,6 @@    _pitem_value  :: Double
 }
 
-{-# DEPRECATED defaultPieChart  "Use the according Data.Default instance!" #-}
-defaultPieChart :: PieChart
-defaultPieChart = def
-
 instance Default PieChart where
   def = PieChart 
     { _pie_data             = []
@@ -99,16 +92,8 @@     , _pie_start_angle      = 0
     }
 
-{-# DEPRECATED defaultPieItem  "Use the according Data.Default instance!" #-}
-defaultPieItem :: PieItem
-defaultPieItem = def
-
 instance Default PieItem where
   def = PieItem "" 0 0
-
-{-# DEPRECATED defaultPieLayout  "Use the according Data.Default instance!" #-}
-defaultPieLayout :: PieLayout
-defaultPieLayout = def
 
 instance Default PieLayout where
   def = PieLayout 
Graphics/Rendering/Chart/Plot/Points.hs view
@@ -10,7 +10,6 @@  module Graphics.Rendering.Chart.Plot.Points(     PlotPoints(..),-    defaultPlotPoints,      -- * Accessors     -- | These accessors are generated by template haskell@@ -59,10 +58,6 @@   where     ps = _plot_points_style p     y = (p_y p1 + p_y p2)/2--{-# DEPRECATED defaultPlotPoints  "Use the according Data.Default instance!" #-}-defaultPlotPoints :: PlotPoints x y-defaultPlotPoints = def  instance Default (PlotPoints x y) where   def = PlotPoints 
Graphics/Rendering/Chart/Plot/Types.hs view
@@ -47,6 +47,9 @@ class ToPlot a where    toPlot :: a x y -> Plot x y +instance ToPlot Plot where+  toPlot p = p+ -- | Join any two plots together (they will share a legend). joinPlot :: Plot x y -> Plot x y -> Plot x y joinPlot Plot{ _plot_render     = renderP
+ Graphics/Rendering/Chart/Plot/Vectors.hs view
@@ -0,0 +1,142 @@+-----------------------------------------------------------------------------+-- |+-- Module      :  Graphics.Rendering.Chart.Plot.Vectors+-- Copyright   :  (c) Anton Vorontsov <anton@enomsg.org> 2014+-- License     :  BSD-style (see chart/COPYRIGHT)+--+-- Vector plots+--+{-# LANGUAGE TemplateHaskell #-}++module Graphics.Rendering.Chart.Plot.Vectors(+    PlotVectors(..),+    VectorStyle(..),+    plotVectorField,+    plot_vectors_mapf,+    plot_vectors_grid,+    plot_vectors_title,+    plot_vectors_style,+    plot_vectors_scale,+    plot_vectors_values,+    vector_line_style,+    vector_head_style,+) where++import Control.Lens+import Control.Monad+import Control.Applicative+import Data.Tuple+import Data.Colour hiding (over)+import Data.Colour.Names+import Data.Default.Class+import Graphics.Rendering.Chart.Axis+import Graphics.Rendering.Chart.Drawing+import Graphics.Rendering.Chart.Geometry+import Graphics.Rendering.Chart.Plot.Types++data VectorStyle = VectorStyle+    { _vector_line_style :: LineStyle+    , _vector_head_style :: PointStyle+    }++$( makeLenses ''VectorStyle )++data PlotVectors x y = PlotVectors+    { _plot_vectors_title        :: String+    , _plot_vectors_style        :: VectorStyle+    -- | Set to 1 (default) to normalize the length of vectors to a space+    --   between them (so that the vectors never overlap on the graph).+    --   Set to 0 to disable any scaling.+    --   Values in between 0 and 1 are also permitted to adjust scaling.+    , _plot_vectors_scale        :: Double+    -- | Provide a square-tiled regular grid.+    , _plot_vectors_grid         :: [(x,y)]+    -- | Provide a vector field (R^2 -> R^2) function.+    , _plot_vectors_mapf         :: (x,y) -> (x,y)+    -- | Provide a prepared list of (start,vector) pairs.+    , _plot_vectors_values       :: [((x,y),(x,y))]+    }++$( makeLenses ''PlotVectors )++mapGrid :: (PlotValue y, PlotValue x)+        => [(x,y)] -> ((x,y) -> (x,y)) -> [((x,y),(x,y))]+mapGrid grid f = zip grid (f <$> grid)++plotVectorField :: (PlotValue x, PlotValue y) => PlotVectors x y -> Plot x y+plotVectorField pv = Plot+    { _plot_render     = renderPlotVectors pv+    , _plot_legend     = [(_plot_vectors_title pv, renderPlotLegendVectors pv)]+    , _plot_all_points = (map fst pts, map snd pts)+    }+  where+    pvals = _plot_vectors_values pv+    mvals = mapGrid (_plot_vectors_grid pv) (_plot_vectors_mapf pv)+    pts = concatMap (\(a,b) -> [a,b]) (pvals ++ mvals)++renderPlotVectors :: (PlotValue x, PlotValue y)+                  => PlotVectors x y -> PointMapFn x y -> ChartBackend ()+renderPlotVectors pv pmap = do+    let pvals   = _plot_vectors_values pv+        mvals   = mapGrid (_plot_vectors_grid pv) (_plot_vectors_mapf pv)+        trans   = translateToStart <$> (pvals ++ mvals)+        pvecs   = filter (\v -> vlen' v > 0) $ over both (mapXY pmap) <$> trans+        mgrid   = take 2 $ fst <$> pvecs+        maxLen  = maximum $ vlen' <$> pvecs+        spacing = (!!1) $ (vlen <$> zipWith psub mgrid (reverse mgrid)) ++ [maxLen]+        sfactor = spacing/maxLen                  -- Non-adjusted scale factor+        afactor = sfactor + (1 - sfactor)*(1 - _plot_vectors_scale pv)+        tails   = pscale afactor <$> pvecs          -- Paths of arrows' tails+        angles  = (vangle . psub' . swap) <$> pvecs -- Angles of the arrows+        centers = snd <$> tails                     -- Where to draw arrow heads+    mapM_ (drawTail radius) tails+    zipWithM_ (drawArrowHead radius) centers angles+  where+    psub' = uncurry psub+    vlen' = vlen . psub'+    pvs = _plot_vectors_style pv+    radius = _point_radius $ _vector_head_style pvs+    hs angle = _vector_head_style pvs & point_shape+                  %~ (\(PointShapeArrowHead a) -> PointShapeArrowHead $ a+angle)+    translateToStart (s@(x,y),(vx,vy)) = (s,(tr x vx,tr y vy))+      where tr p t = fromValue $ toValue p + toValue t+    pscale w v@(s,_) = (s,translateP (vscale w . psub' $ swap v) s)+    drawTail r v = withLineStyle (_vector_line_style pvs) $+        strokePointPath $ (^..each) v'+      where+        v'  = pscale (1-(3/2)*r/l) v+        l   = vlen' v+    drawArrowHead r (Point x y) theta =+        withTranslation (Point (-r*cos theta) (-r*sin theta))+                        (drawPoint (hs theta) (Point x y))++renderPlotLegendVectors :: (PlotValue x, PlotValue y)+                        => PlotVectors x y -> Rect -> ChartBackend ()+renderPlotLegendVectors pv (Rect p1 p2) = do+    let y = (p_y p1 + p_y p2)/2+        pv' = plot_vectors_grid .~ []+            $ plot_vectors_values .~ [((fromValue $ p_x p1, fromValue y),+                                       (fromValue $ p_x p2, fromValue 0))]+            $ pv+    renderPlotVectors pv' pmap+  where+    pmap (LValue x,LValue y) = Point (toValue x) (toValue y)+    pmap _ = Point 0 0++instance Default VectorStyle where+  def = VectorStyle+    { _vector_line_style = (solidLine lw $ opaque blue)+                              { _line_cap = LineCapSquare }+    , _vector_head_style = PointStyle (opaque red) transparent lw (2*lw)+                                      (PointShapeArrowHead 0)+    } where lw = 2++instance Default (PlotVectors x y) where+  def = PlotVectors+    { _plot_vectors_title        = ""+    , _plot_vectors_style        = def+    , _plot_vectors_scale        = 1+    , _plot_vectors_grid         = []+    , _plot_vectors_mapf         = id+    , _plot_vectors_values       = []+    }
Graphics/Rendering/Chart/Renderable.hs view
@@ -133,7 +133,7 @@       render r rsize  -- | Helper function for using a renderable, when we generate it---   in the CRender monad.+--   in the ChartBackend monad. embedRenderable :: ChartBackend (Renderable a) -> Renderable a embedRenderable ca = Renderable {    minsize = do { a <- ca; minsize a },
+ Graphics/Rendering/Chart/State.hs view
@@ -0,0 +1,105 @@+{-# LANGUAGE TemplateHaskell, FlexibleInstances #-}+module Graphics.Rendering.Chart.State(+  plot,+  plotLeft,+  plotRight,++  takeColor,+  takeShape,++  CState,+  colors,+  shapes,++  EC,+  execEC,+  liftEC,+  liftCState,+  ) where++import Control.Lens+import Control.Monad.State+import Data.Default.Class+import Data.List(cycle)++import Data.Colour+import Data.Colour.Names++import Graphics.Rendering.Chart.Layout+import Graphics.Rendering.Chart.Plot+import Graphics.Rendering.Chart.Axis+import Graphics.Rendering.Chart.Backend+import Graphics.Rendering.Chart.Drawing+import Graphics.Rendering.Chart.Renderable++-- | The state held when monadically constructing a graphical element+data CState = CState {+  _colors :: [AlphaColour Double], -- ^ An infinite source of colors, for use in plots+  _shapes :: [PointShape]          -- ^ An infinite source of shapes, for use in plots+  }++$( makeLenses ''CState )++-- | We use nested State monads to give nice syntax. The outer state+-- is the graphical element being constructed (typically a+-- layout). The inner state contains any additional state+-- reqired. This approach means that lenses and the state monad lens+-- operators can be used directly on the value being constructed.+type EC l a = StateT l (State CState) a++instance Default CState where+  def = CState colors shapes+    where+      colors = cycle (map opaque [blue,green,red,orange,yellow,violet])+      shapes = cycle [PointShapeCircle,PointShapePlus,PointShapeCross,PointShapeStar]+      +-- | Run the monadic `EC` computation, and return the graphical+-- element (ie the outer monad' state)+execEC :: (Default l) => EC l a -> l+execEC ec = evalState (execStateT ec def) def++-- | Nest the construction of a graphical element within+-- the construction of another.+liftEC :: (Default l1) => EC l1 a -> EC l2 l1+liftEC ec = do+  cs <- lift get+  let (l,cs') = runState (execStateT ec def) cs+  lift (put cs')+  return l++-- | Lift a a computation over `CState`+liftCState :: State CState a -> EC l a+liftCState = lift++-- | Add a plot to the `Layout` being constructed.+plot :: (ToPlot p) => EC (Layout x y) (p x y) -> EC (Layout x y) ()+plot pm = do+    p <- pm+    layout_plots %= (++[toPlot p])++-- | Add a plot against the left axis to the `LayoutLR` being constructed.+plotLeft :: (ToPlot p) => EC (LayoutLR x y1 y2) (p x y1) -> EC (LayoutLR x y1 y2) ()+plotLeft pm = do+  p <- pm+  layoutlr_plots %= (++[Left (toPlot p)])++-- | Add a plot against the right axis tof the `LayoutLR` being constructed.+plotRight :: (ToPlot p) => EC (LayoutLR x y1 y2) (p x y2) -> EC (LayoutLR x y1 y2) ()+plotRight pm = do+  p <- pm+  layoutlr_plots %= (++[Right (toPlot p)])++-- | Pop and return the next color from the state+takeColor :: EC l (AlphaColour Double)+takeColor = liftCState $ do+  (c:cs) <- use colors+  colors .= cs+  return c++-- | Pop and return the next shape from the state+takeShape :: EC l PointShape+takeShape = liftCState $ do+  (c:cs) <- use shapes+  shapes .= cs+  return c+