Chart-tests 1.9.3 → 1.9.4
raw patch · 6 files changed
+209/−82 lines, 6 filesdep +QuickCheckdep +vectordep ~data-default-classdep ~lens
Dependencies added: QuickCheck, vector
Dependency ranges changed: data-default-class, lens
Files
- Chart-tests.cabal +6/−3
- tests/Test15.hs +3/−3
- tests/Test20.hs +103/−0
- tests/Test4.hs +13/−4
- tests/Test9.hs +7/−5
- tests/Tests.hs +77/−67
Chart-tests.cabal view
@@ -1,5 +1,5 @@ Name: Chart-tests-Version: 1.9.3+Version: 1.9.4 License: BSD3 License-file: LICENSE Copyright: Tim Docker, 2006-2014@@ -25,7 +25,7 @@ time, mtl, colour >= 2.2.1 && < 2.4,- lens >= 3.9 && < 4.19,+ lens >= 3.9 && < 5.3, data-default-class < 0.2, bytestring >= 0.9 && < 1.0, svg-builder >= 0.1 && < 0.2,@@ -42,7 +42,9 @@ diagrams-svg >= 1.4 && < 1.5, diagrams-postscript >= 0.7 && < 1.6, diagrams-lib >= 1.2 && < 1.5,- diagrams-core >= 1.3 && < 1.5+ diagrams-core >= 1.3 && < 1.6,+ vector >= 0.9 && < 0.13,+ QuickCheck >= 2.10 && < 2.15 Main-is: Main.hs Hs-Source-Dirs: tests Ghc-Options: -threaded@@ -71,6 +73,7 @@ Test15 Test17 Test19+ Test20 TestParametric Tests TestSparkLines
tests/Test15.hs view
@@ -1,4 +1,4 @@-module Test15 where +module Test15 where import Graphics.Rendering.Chart import Data.Colour@@ -10,14 +10,14 @@ chart lo lp = layoutToRenderable layout where- layout = + layout = layout_title .~ "Legend Test" $ layout_title_style . font_size .~ 10 $ layout_x_axis . laxis_generate .~ autoIndexAxis alabels $ layout_y_axis . laxis_override .~ axisGridHide $ layout_left_axis_visibility . axis_show_ticks .~ False $ layout_plots .~ [ plotBars bars2 ]- $ layout_legend .~ Just lstyle+ $ layout_legend ?~ lstyle $ def :: Layout PlotIndex Double bars2 = plot_bars_titles .~ ["A","B","C","D","E","F","G","H","I","J"]
+ tests/Test20.hs view
@@ -0,0 +1,103 @@+module Test20 where++import Text.Printf+import Graphics.Rendering.Chart+import Data.Colour+import Data.Colour.Names+import Control.Lens+import Data.Default.Class++import Utils+import Test.QuickCheck (Result(Failure))++dat :: [[Double]]+dat = [ [0.0, 23.81232131645]+ , [83.87632543135, 0.0]+ , [0.0, 0.0]+ , [66.22192174833207, 50.85424119528999]+ , [18.507408294149144, 29.94826136042779]+ , [271.34564215397256, 482.0060747629345]+ , [0.33308595521927825, 0.25399999403605966]+ , [8.418936013584233, 5.144029932796894]+ , [67.19053209933879, 62.55976275368557]+ , [0.20500418021076805, 0.7397264674905577]+ , [93.52395426151023, 96.01214737959424]+ , [486.5332691543843, 333.4124444949074]+ , [151.27192832718126, 317.4545157262858]+ , [42.246424931587924, 56.89305428360467]+ , [8.812241283978576, 3.0449891300138225]+ , [41.763424901388305, 23.924663084356638]+ , [50.77174917622324, 91.54897286917759]+ , [0.743806669182276, 0.14540395376496337]+ , [3.152519452338129, 3.76835741734118]+ , [55.75637240640731, 66.5350935501769]+ , [0.9546959351374888, 0.6673023316342984]+ , [58.81299411301322, 41.6766677808916]+ , [7.496126744615885, 1.4640493059283133]+ , [1.21316661759154927, 2.547769800092524232]+ , [0.97655290356243897, 0.90002335523825158]+ , [0.74607620980626329, 0.618295299567391062]+ , [33.3228047562302481, 58.28982568453356767]+ , [4.73981774972079753, 5.092283613261595367]+ ]++chart :: Renderable (LayoutPick LogValue PlotIndex PlotIndex)+chart = layoutToRenderable layout+ where+ layout =+ -- title + legend+ layout_title .~ "Sample Horizontal Log Bars"+ $ layout_title_style . font_size .~ 10+ $ layout_legend . _Just . legend_position .~ LegendAbove+ $ layout_legend . _Just . legend_margin .~ 10++ -- X+ $ layout_x_axis . laxis_style . axis_grid_style .~ solidLine 0.15 (opaque lightgrey)+ $ layout_x_axis . laxis_style . axis_label_gap .~ 3+ $ layout_x_axis . laxis_override .~ axisGridAtBigTicks+ $ layout_top_axis_visibility . axis_show_line .~ True+ $ layout_top_axis_visibility . axis_show_ticks .~ True+ $ layout_top_axis_visibility . axis_show_labels .~ True+ $ layout_bottom_axis_visibility . axis_show_ticks .~ True++ -- Y+ $ layout_y_axis . laxis_generate .~ autoIndexAxis' True alabels+ $ layout_y_axis . laxis_override .~ axisGridAtTicks+ $ layout_y_axis . laxis_reverse .~ True+ $ layout_y_axis . laxis_style . axis_grid_style .~ solidLine 0.3 (opaque lightgrey)+ $ layout_y_axis . laxis_style . axis_label_style . font_size .~ 9+ $ layout_left_axis_visibility . axis_show_ticks .~ False++ -- data+ $ layout_plots .~ [ plotHBars bars2 ]++ $ def :: Layout LogValue PlotIndex++ bars2 = plot_bars_values_with_labels .~ addIndexes dat'+ $ plot_bars_titles .~ ["","after","before"]+ $ plot_bars_style .~ BarsStacked+ $ plot_bars_spacing .~ BarsFixGap 12 5+ $ plot_bars_item_styles .~ map (\c -> (solidFillStyle $ withOpacity c 0.7, Nothing)) [grey, red, green]+ $ plot_bars_label_bar_hanchor .~ BHA_Right+ $ plot_bars_label_bar_vanchor .~ BVA_Centre+ $ plot_bars_label_text_hanchor .~ HTA_Left+ $ plot_bars_label_text_vanchor .~ VTA_Centre+ $ plot_bars_label_offset .~ Vector 3 0+ $ plot_bars_label_style . font_slant .~ FontSlantItalic+ $ def++ dat' = map (\[a,b] -> [ (LogValue (min a b), if a == b then "0.0" else "")+ , if a < b then+ let v = b - a in+ (LogValue v, printf "%0.2f" v)+ else (LogValue 0, "")+ , if b < a then+ let v = a - b in+ (LogValue v, printf "%0.2f" (-v))+ else (LogValue 0, "")+ ]) dat++ alabels =+ ["addedDataPointName", "removedDataPointName", "nullDataPointName"] +++ map (\n -> "longDataPointName" ++ show n) (take (length dat - 3) [1..])+
tests/Test4.hs view
@@ -1,10 +1,10 @@ module Test4 where -import Graphics.Rendering.Chart+import Control.Lens import Data.Colour import Data.Colour.Names-import Control.Lens import Data.Default.Class+import Graphics.Rendering.Chart import Utils @@ -12,11 +12,20 @@ chart xrev yrev = layoutToRenderable layout where + pointValues = [ (x, 10**x) | x <- [0.5,1,1.5,2,2.5 :: Double] ]+ points = plot_points_style .~ filledCircles 3 (opaque red)- $ plot_points_values .~ [ (x, 10**x) | x <- [0.5,1,1.5,2,2.5 :: Double] ]+ $ plot_points_values .~ pointValues $ plot_points_title .~ "values" $ def + labels = plot_annotation_hanchor .~ HTA_Left+ $ plot_annotation_vanchor .~ VTA_Top+ $ plot_annotation_offset .~ Vector 10 10+ $ plot_annotation_values .~ [ (x, y, show (x, y)) | (x, y) <- pointValues ]+ $ def++ lines = plot_lines_values .~ [ [(x, 10**x) | x <- [0,3]] ] $ plot_lines_title .~ "values" $ def@@ -27,7 +36,7 @@ $ layout_y_axis . laxis_generate .~ autoScaledLogAxis def $ layout_y_axis . laxis_title .~ "vertical" $ layout_y_axis . laxis_reverse .~ yrev- $ layout_plots .~ [ toPlot points, toPlot lines ]+ $ layout_plots .~ [ toPlot points, toPlot lines, toPlot labels ] $ def -- main = main' "test4" (chart False False)
tests/Test9.hs view
@@ -1,17 +1,18 @@-module Test9 where +module Test9 where -import Graphics.Rendering.Chart+import Control.Arrow+import Control.Lens import Data.Colour import Data.Colour.Names-import Control.Lens import Data.Default.Class+import Graphics.Rendering.Chart import Utils chart :: Bool -> Renderable (LayoutPick PlotIndex Double Double) chart borders = layoutToRenderable layout where- layout = + layout = layout_title .~ "Sample Bars" ++ btitle $ layout_title_style . font_size .~ 10 $ layout_x_axis . laxis_generate .~ autoIndexAxis alabels@@ -21,12 +22,13 @@ $ def :: Layout PlotIndex Double bars2 = plot_bars_titles .~ ["Cash","Equity"]- $ plot_bars_values .~ addIndexes [[20,45],[45,30],[30,20],[70,25]]+ $ plot_bars_values_with_labels .~ addLabels (addIndexes vals) $ plot_bars_style .~ BarsClustered $ plot_bars_spacing .~ BarsFixGap 30 5 $ plot_bars_item_styles .~ map mkstyle (cycle defaultColorSeq) $ def + vals = [[20,45],[45,30],[30,20],[70,25]] alabels = [ "Jun", "Jul", "Aug", "Sep", "Oct" ] btitle = if borders then "" else " (no borders)"
tests/Tests.hs view
@@ -5,19 +5,19 @@ import Graphics.Rendering.Chart.Drawing import Graphics.Rendering.Chart.Grid -import System.Time-import System.Random-import Data.Time.LocalTime import Control.Lens+import Control.Monad import Data.Char (chr) import Data.Colour import Data.Colour.Names import Data.Colour.SRGB-import Data.List(sort,nub,scanl1) import Data.Default.Class+import Data.List(sort,nub,scanl1) import qualified Data.Map as Map-import Control.Monad+import Data.Time.LocalTime import Prices+import System.Random+import System.Time import qualified Test1 import qualified Test2 import qualified Test3@@ -31,6 +31,7 @@ import qualified Test15 import qualified Test17 import qualified Test19+import qualified Test20 import qualified TestParametric import qualified TestSparkLines @@ -39,7 +40,7 @@ fwhite = solidFillStyle $ opaque white test1a :: Double -> Renderable (LayoutPick Double Double Double)-test1a lwidth = fillBackground fwhite $ (gridToRenderable t)+test1a lwidth = fillBackground fwhite $ gridToRenderable t where t = aboveN [ besideN [layoutToGrid l1, layoutToGrid l2, layoutToGrid l3], besideN [layoutToGrid l4, layoutToGrid l5, layoutToGrid l6] ]@@ -117,7 +118,7 @@ ---------------------------------------------------------------------- test9 :: PlotBarsAlignment -> LineWidth -> Renderable (LayoutPick PlotIndex Double Double)-test9 alignment lw = fillBackground fwhite $ (gridToRenderable t)+test9 alignment lw = fillBackground fwhite (gridToRenderable t) where t = weights (1,1) $ aboveN [ besideN [rf g0, rf g1, rf g2], besideN [rf g3, rf g4, rf g5] ]@@ -166,14 +167,22 @@ $ layout_plots .~ [ plotBars bars ] $ def :: Layout PlotIndex Double + vals1 = [[20],[45],[30],[70]] bars1 = plot_bars_titles .~ ["Cash"]- $ plot_bars_values .~ addIndexes [[20],[45],[30],[70]]+ $ plot_bars_values_with_labels .~ addLabels (addIndexes vals1) $ plot_bars_alignment .~ alignment+ $ plot_bars_label_bar_hanchor .~ BHA_Centre+ $ plot_bars_label_bar_vanchor .~ BVA_Centre+ $ plot_bars_label_text_hanchor .~ HTA_Centre $ def + vals2 = [[20,45],[45,30],[30,20],[70,25]] bars2 = plot_bars_titles .~ ["Cash","Equity"]- $ plot_bars_values .~ addIndexes [[20,45],[45,30],[30,20],[70,25]]+ $ plot_bars_values_with_labels .~ addLabels (addIndexes vals2) $ plot_bars_alignment .~ alignment+ $ plot_bars_label_bar_hanchor .~ BHA_Centre+ $ plot_bars_label_bar_vanchor .~ BVA_Centre+ $ plot_bars_label_text_hanchor .~ HTA_Centre $ def -------------------------------------------------------------------------------@@ -248,8 +257,8 @@ $ layout_y_axis . laxis_title .~ "double values" $ def -mkStack ls f = - renderStackedLayouts +mkStack ls f =+ renderStackedLayouts $ slayouts_layouts .~ ls $ slayouts_compress_legend .~ f $ def@@ -258,7 +267,7 @@ test11a lw = test11_ f where f l1 l2 = mkStack [StackedLayout l1, StackedLayout l2] False- + test11b :: LineWidth -> Renderable () test11b lw = test11_ f where@@ -269,22 +278,22 @@ -- should produce the same output as test10 test11c :: LineWidth -> Renderable ()-test11c lw = +test11c lw = mkStack [ StackedLayoutLR (test10LR prices1 lw)] True test11d :: LineWidth -> Renderable ()-test11d lw = +test11d lw = mkStack [ StackedLayoutLR (Test2.chartLR prices1 False lw) , StackedLayoutLR (test10LR prices1 lw) ] False test11e :: LineWidth -> Renderable ()-test11e lw = +test11e lw = let l2 = Test2.chartLR prices1 False lw b = opaque black -- how to use lens to get inside the maybe? l2' = -- layoutlr_legend . Just . legend_label_style . font_color .~ b- layoutlr_legend .~ Just ((legend_label_style . font_color .~ b) $ def)+ layoutlr_legend ?~ (legend_label_style . font_color .~ b) def $ (layoutlr_axes_styles %~ c) l2 c as = axis_line_style .~ solidLine 1 b $ axis_label_style . font_color .~ b@@ -310,7 +319,7 @@ _axis_ticks = [(v,3) | v <- [0,1..15]], _axis_grid = [0,5..15], _axis_labels = [[(v,show v) | v <- [0,5..15]]]- } + } laxis = AxisData { _axis_visibility = def,@@ -319,7 +328,7 @@ _axis_ticks = [(v,3) | v <- [0,25..500]], _axis_grid = [0,100..500], _axis_labels = [[(v,show v) | v <- [0,100..500]]]- } + } plot = plot_lines_values .~ [vs1] $ def@@ -334,7 +343,7 @@ ------------------------------------------------------------------------------- -- Plot annotations test -test13 lw = fillBackground fwhite $ (gridToRenderable t)+test13 lw = fillBackground fwhite (gridToRenderable t) where t = weights (1,1) $ aboveN [ besideN [tval (annotated h v) | h <- hs] | v <- vs ] hs = [HTA_Left, HTA_Centre, HTA_Right]@@ -351,7 +360,7 @@ $ plot_annotation_values .~ [(x,x,"Hello World\n(plain)")|x<-points] $ def rotPlot = plot_annotation_angle .~ -45.0- $ plot_annotation_style .~ def {_font_size=10, _font_weight=FontWeightBold, _font_color=(opaque blue) }+ $ plot_annotation_style .~ def {_font_size=10, _font_weight=FontWeightBold, _font_color=opaque blue } $ plot_annotation_values .~ [(x,x,"Hello World\n(fancy)")|x<-points] $ labelPlot @@ -364,7 +373,7 @@ where grid = [(x,y) | x <- range, y <- range] where range = [-5,-4..5] - proj1 = plot_vectors_style . vector_head_style . point_color .~ (opaque green)+ proj1 = plot_vectors_style . vector_head_style . point_color .~ opaque green $ plot_vectors_mapf .~ (\(x,y) -> (-x,-y)) $ plot_vectors_grid .~ grid $ plot_vectors_title .~ "Projection1"@@ -376,13 +385,13 @@ $ def layout = layout_title .~ "Vector Plot: Abyss"- $ layout_plots .~ plotVectorField `liftM` [proj1,proj2]+ $ layout_plots .~ map plotVectorField [proj1,proj2] $ def ---------------------------------------------------------------------- -- a quick test to display labels with all combinations -- of anchors-misc1 fsz rot lw = fillBackground fwhite $ (gridToRenderable t)+misc1 fsz rot lw = fillBackground fwhite (gridToRenderable t) where t = weights (1,1) $ aboveN [ besideN [tval (lb h v) | h <- hs] | v <- vs ] lb h v = addMargins (20,20,20,20) $ fillBackground fblue $ crossHairs $ rlabel fs h v rot s@@ -399,8 +408,8 @@ render = \sz@(w,h) -> do let xa = w / 2 let ya = h / 2- alignStrokePoints [Point 0 ya,Point w ya] >>= strokePointPath - alignStrokePoints [Point xa 0,Point xa h] >>= strokePointPath + alignStrokePoints [Point 0 ya,Point w ya] >>= strokePointPath+ alignStrokePoints [Point xa 0,Point xa h] >>= strokePointPath render r sz } @@ -409,62 +418,63 @@ allTests :: [ (String, (Int,Int), LineWidth -> Renderable ()) ] allTests =- [ ("test1", stdSize, \lw -> simple $ Test1.chart lw )- , ("test1a", stdSize, \lw -> simple $ test1a lw )- , ("test2a", stdSize, \lw -> simple $ Test2.chart prices False lw)- , ("test2b", stdSize, \lw -> simple $ Test2.chart prices1 False lw)- , ("test2c", stdSize, \lw -> simple $ Test2.chart prices2 False lw)- , ("test2d", stdSize, \lw -> simple $ Test2.chart prices5 True lw)- , ("test2e", stdSize, \lw -> simple $ Test2.chart prices6 True lw)- , ("test2f", stdSize, \lw -> simple $ Test2.chart prices7 True lw)- , ("test2g", stdSize, \lw -> simple $ Test2.chart prices3 False lw)- , ("test2h", stdSize, \lw -> simple $ Test2.chart prices8 True lw)- , ("test2i", stdSize, \lw -> simple $ Test2.chart prices9 True lw)- , ("test2j", stdSize, \lw -> simple $ Test2.chart prices10 True lw)- , ("test2k", stdSize, \lw -> simple $ Test2.chart prices10a True lw)- , ("test2m", stdSize, \lw -> simple $ Test2.chart prices11 True lw)- , ("test2n", stdSize, \lw -> simple $ Test2.chart prices10b True lw)- , ("test2o", stdSize, \lw -> simple $ Test2.chart prices12 True lw)- , ("test2p", stdSize, \lw -> simple $ Test2.chart prices13 True lw)- , ("test2q", stdSize, \lw -> simple $ Test2.chart prices13a True lw)- , ("test2r", stdSize, \lw -> simple $ Test2.chart prices13b True lw)- , ("test2s", stdSize, \lw -> simple $ Test2.chart prices14 True lw)- , ("test2t", stdSize, \lw -> simple $ Test2.chart prices14a True lw)- , ("test2u", stdSize, \lw -> simple $ Test2.chart prices14b True lw)- , ("test2v", stdSize, \lw -> simple $ Test2.chart prices14c True lw)- , ("test2w", stdSize, \lw -> simple $ Test2.chart prices14d True lw)+ [ ("test1", stdSize, simple . Test1.chart)+ , ("test1a", stdSize, simple . test1a)+ , ("test2a", stdSize, simple . Test2.chart prices False)+ , ("test2b", stdSize, simple . Test2.chart prices1 False)+ , ("test2c", stdSize, simple . Test2.chart prices2 False)+ , ("test2d", stdSize, simple . Test2.chart prices5 True )+ , ("test2e", stdSize, simple . Test2.chart prices6 True )+ , ("test2f", stdSize, simple . Test2.chart prices7 True )+ , ("test2g", stdSize, simple . Test2.chart prices3 False)+ , ("test2h", stdSize, simple . Test2.chart prices8 True )+ , ("test2i", stdSize, simple . Test2.chart prices9 True )+ , ("test2j", stdSize, simple . Test2.chart prices10 True )+ , ("test2k", stdSize, simple . Test2.chart prices10a True )+ , ("test2m", stdSize, simple . Test2.chart prices11 True )+ , ("test2n", stdSize, simple . Test2.chart prices10b True )+ , ("test2o", stdSize, simple . Test2.chart prices12 True )+ , ("test2p", stdSize, simple . Test2.chart prices13 True )+ , ("test2q", stdSize, simple . Test2.chart prices13a True )+ , ("test2r", stdSize, simple . Test2.chart prices13b True )+ , ("test2s", stdSize, simple . Test2.chart prices14 True )+ , ("test2t", stdSize, simple . Test2.chart prices14a True )+ , ("test2u", stdSize, simple . Test2.chart prices14b True )+ , ("test2v", stdSize, simple . Test2.chart prices14c True )+ , ("test2w", stdSize, simple . Test2.chart prices14d True ) , ("test3", stdSize, const $ simple Test3.chart) , ("test4a", stdSize, const $ simple (Test4.chart False False)) , ("test4b", stdSize, const $ simple (Test4.chart True False)) , ("test4c", stdSize, const $ simple (Test4.chart False True))- , ("test4d", stdSize, \lw -> simple $ test4d lw)- , ("test5", stdSize, \lw -> simple $ Test5.chart lw)+ , ("test4d", stdSize, simple . test4d)+ , ("test5", stdSize, simple . Test5.chart) , ("test7", stdSize, const $ simple Test7.chart) , ("test8", stdSize, const $ simple Test8.chart) , ("test9", stdSize, const $ simple (Test9.chart True)) , ("test9b", stdSize, const $ simple (Test9.chart False))- , ("test9c", stdSize, \lw -> simple $ test9 BarsCentered lw)- , ("test9l", stdSize, \lw -> simple $ test9 BarsLeft lw)- , ("test9r", stdSize, \lw -> simple $ test9 BarsRight lw)- , ("test10", stdSize, \lw -> simple $ test10 prices1 lw)- , ("test11a", stdSize, \lw -> simple $ test11a lw)- , ("test11b", stdSize, \lw -> simple $ test11b lw)- , ("test11c", stdSize, \lw -> simple $ test11c lw)- , ("test11d", stdSize, \lw -> simple $ test11d lw)- , ("test11e", stdSize, \lw -> simple $ test11e lw)- , ("test12", stdSize, \lw -> simple $ test12 lw)- , ("test13", stdSize, \lw -> simple $ test13 lw)- , ("test14", stdSize, \lw -> simple $ Test14.chart lw )- , ("test14a", stdSize, \lw -> simple $ Test14a.chart lw )+ , ("test9c", stdSize, simple . test9 BarsCentered)+ , ("test9l", stdSize, simple . test9 BarsLeft)+ , ("test9r", stdSize, simple . test9 BarsRight)+ , ("test10", stdSize, simple . test10 prices1)+ , ("test11a", stdSize, simple . test11a)+ , ("test11b", stdSize, simple . test11b)+ , ("test11c", stdSize, simple . test11c)+ , ("test11d", stdSize, simple . test11d)+ , ("test11e", stdSize, simple . test11e)+ , ("test12", stdSize, simple . test12)+ , ("test13", stdSize, simple . test13)+ , ("test14", stdSize, simple . Test14.chart)+ , ("test14a", stdSize, simple . Test14a.chart) , ("test15a", stdSize, const $ simple (Test15.chart (LORows 2) LegendBelow)) , ("test15b", stdSize, const $ simple (Test15.chart (LOCols 2) LegendBelow)) , ("test15c", stdSize, const $ simple (Test15.chart (LORows 2) LegendLeft)) , ("test15d", stdSize, const $ simple (Test15.chart (LORows 2) LegendRight)) , ("test15e", stdSize, const $ simple (Test15.chart (LOCols 2) LegendAbove))- , ("test17", stdSize, \lw -> simple $ Test17.chart lw)+ , ("test17", stdSize, simple . Test17.chart) , ("test18", stdSize, const $ simple test18) , ("test19", stdSize, const $ simple Test19.chart) , ("test19b", stdSize, const $ simple Test19.chart2)+ , ("test20", stdSize, const $ simple Test20.chart) , ("misc1", stdSize, setPickFn nullPickFn . misc1 20 0) -- perhaps a bit excessive , ("misc1a", stdSize, setPickFn nullPickFn . misc1 12 45)@@ -474,7 +484,7 @@ , ("misc1e", stdSize, setPickFn nullPickFn . misc1 12 205) , ("misc1f", stdSize, setPickFn nullPickFn . misc1 12 270) , ("misc1g", stdSize, setPickFn nullPickFn . misc1 12 315)- , ("parametric", stdSize, \lw -> simple $ TestParametric.chart lw )+ , ("parametric", stdSize, simple . TestParametric.chart) , ("sparklines", TestSparkLines.chartSize, const $ simple TestSparkLines.chart ) ] where simple :: Renderable a -> Renderable ()@@ -488,7 +498,7 @@ doTest (s,size,f) = do putStrLn (s ++ "... ") ofn (s,size,f)- + getTests :: [String] -> [(String,(Int,Int),LineWidth -> Renderable ())] getTests names = filter (match names) allTests