module Simulation.Aivika.Experiment.Chart
(colourisePlotLines,
colourisePlotFillBetween,
colourisePlotBars) where
import Data.Colour
import Data.Colour.Names
import Data.Accessor
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)