From a14980468cbac953d5e6d58f16830eb3660e4842 Mon Sep 17 00:00:00 2001 From: Yuriy Syrovetskiy Date: Mon, 8 Jun 2020 14:27:11 +0300 Subject: [PATCH] Remove redundant constraint --- chart/Graphics/Rendering/Chart/Easy.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chart/Graphics/Rendering/Chart/Easy.hs b/chart/Graphics/Rendering/Chart/Easy.hs index d1fa0e42..06c7df2e 100644 --- a/chart/Graphics/Rendering/Chart/Easy.hs +++ b/chart/Graphics/Rendering/Chart/Easy.hs @@ -6,7 +6,7 @@ -- License : BSD-style (see chart/COPYRIGHT) -- -- A high level API for generating a plot quickly. --- +-- -- 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.Lens and Data.Colour. The module also provides several helper functions for @@ -17,10 +17,10 @@ -- -- > import Graphics.Rendering.Chart.Easy -- > import Graphics.Rendering.Chart.Backend.Cairo --- > +-- > -- > signal :: [Double] -> [(Double,Double)] -- > signal xs = [ (x,(sin (x*3.14159/45) + 1) / 2 * (sin (x*3.14159/5))) | x <- xs ] --- > +-- > -- > main = toFile def "example.png" $ do -- > layout_title .= "Amplitude Modulation" -- > plot (line "am" [signal [0,(0.5)..400]]) @@ -83,7 +83,7 @@ points title values = liftEC $ do plot_points_style . point_color .= color plot_points_style . point_shape .= shape plot_points_style . point_radius .= 2 - + -- Show borders for unfilled shapes when (not (isFilled shape)) $ do plot_points_style . point_border_color .= color @@ -93,10 +93,10 @@ isFilled :: PointShape -> Bool isFilled PointShapeCircle = True isFilled PointShapePolygon{} = True isFilled _ = False - + -- | 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) +-- next available colors +bars :: (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