Safe Haskell | None |
---|---|
Language | Haskell2010 |
Chart.Line
Description
Points on a chart connected by lines.
- data LineOptions = LineOptions {}
- oneline :: R2 r => LineOptions -> Pair (r Double) -> Chart b
- lines :: (Traversable f, R2 r) => LineOptions -> f (r Double) -> Chart b
- glines :: (Traversable f, R2 r) => LineOptions -> GlyphOptions b -> f (r Double) -> Chart b
- lineChart :: Traversable f => [LineOptions] -> Aspect -> Rect Double -> [f (Pair Double)] -> Chart b
- lineChart_ :: Traversable f => [LineOptions] -> Aspect -> [f (Pair Double)] -> Chart b
- glineChart :: Traversable f => [LineOptions] -> [GlyphOptions b] -> Aspect -> Rect Double -> [f (Pair Double)] -> Chart b
- glineChart_ :: Traversable f => [LineOptions] -> [GlyphOptions b] -> Aspect -> [f (Pair Double)] -> Chart b
Documentation
data LineOptions Source #
The main features of a line (that distinguish it from a glyph say) is that:
- it exists over multiple points (a line can't exist at a single point)
- line rendering is normalized to the eventual physical chart
Constructors
LineOptions | |
Fields
|
Instances
oneline :: R2 r => LineOptions -> Pair (r Double) -> Chart b Source #
A single line connecting 2 points
lines :: (Traversable f, R2 r) => LineOptions -> f (r Double) -> Chart b Source #
A line connecting a series of points
lines def (dataXY cos (Range 0 (4*pi)) n)
glines :: (Traversable f, R2 r) => LineOptions -> GlyphOptions b -> f (r Double) -> Chart b Source #
Lines with glyphs atop eack point
lineChart :: Traversable f => [LineOptions] -> Aspect -> Rect Double -> [f (Pair Double)] -> Chart b Source #
A chart of lines
lineChart_ :: Traversable f => [LineOptions] -> Aspect -> [f (Pair Double)] -> Chart b Source #
A chart of lines scaled to its own range
import Data.Colour.Palette.Harmony (tetrad) ls = map (uncurry Pair) <$> [[(0.0,1.0),(1.0,1.0),(2.0,5.0)], [(0.0,0.0),(3.0,3.0)], [(0.5,4.0),(0.5,0)]] lopts = zipWith (\x y -> LineOptions x (withOpacity y 0.6)) [0.01,0.02,0.005] (tetrad blue) lineChart_ lopts sixbyfour ls
glineChart :: Traversable f => [LineOptions] -> [GlyphOptions b] -> Aspect -> Rect Double -> [f (Pair Double)] -> Chart b Source #
A chart of glines
glineChart_ :: Traversable f => [LineOptions] -> [GlyphOptions b] -> Aspect -> [f (Pair Double)] -> Chart b Source #
A chart of glyphs_lines scaled to its own range
let gopts = zipWith (\x y -> def {glyphColor=transparent, glyphBorderColor=withOpacity x 0.6, glyphShape=y}) (tetrad green) [triangle, square, circle] glineChart_ lopts gopts sixbyfour ls