module Simulation.Aivika.Experiment.Chart.Utils
(colourisePlotLines,
colourisePlotFillBetween,
colourisePlotBars) where
import Control.Lens
import Data.Colour
import Data.Colour.Names
import Graphics.Rendering.Chart
colourisePlotLines :: [PlotLines x y -> PlotLines x y]
colourisePlotLines = map mkstyle $ cycle defaultColorSeq
where mkstyle c = plot_lines_style . line_color .~ c
colourisePlotFillBetween :: [PlotFillBetween x y -> PlotFillBetween x y]
colourisePlotFillBetween = map mkstyle $ cycle defaultColorSeq
where mkstyle c = plot_fillbetween_style .~ solidFillStyle (dissolve 0.4 c)
colourisePlotBars :: PlotBars x y -> PlotBars x y
colourisePlotBars = plot_bars_item_styles .~ map mkstyle (cycle defaultColorSeq)
where mkstyle c = (solidFillStyle c, Just $ solidLine 1.0 $ opaque black)