x       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ SafeSafe 6;<=>?FTMk@Numerical equality %Comparison within numerical precision.The class of invertible linear transformations!Inverse matrix action on a vector9Diagonal matrices in R2 behave as scaling transformationsEMultiplicative matrix semigroup ("multiplying" two matrices together)Matrix product3Linear maps, i.e. linear transformations of vectors 5Matrix action, i.e. linear transformation of a vector HA Mat2 can be seen as a linear operator that acts on points in the plane Hermitian space : inner product Inner product2Vector space : multiplication by a scalar quantityScalar multiplicationAdditive group : v ^+^ zero == zero ^+^ v == v v ^-^ v == zeroIdentity elementGroup action ("sum")$Inverse group action ("subtraction")V2 is a vector in R^2(A frame, i.e. a bounding box for objectsA  carries a "label" (i.e. any additional information such as a text tag, or any other data structure), in addition to position information. Data points on a plot are s.!The coordinates of the / (i.e. where in the figure it will be rendered)"Data associated with the #A #$ object defines a point in the plane,A binary operation on the components of two #s)A unary operation on the components of a #'$The origin of the axes, point (0, 0)The (1, 1) point"Cartesian distance from the originBOverwrite either coordinate of a Point, to e.g. project on an axis(!Given a labelling function and a # p , returned a  containing p and the computed label)Apply a function to the label+)Build a frame rooted at the origin (0, 0)The unit square (0, 0) - (1, 1), Create a  from a container of #s P, i.e. construct two points p1 and p2 such that :p1 := inf(x,y) Pp2 := sup(x,y) PFrame corner coordinatesFrame corner coordinatesFrame corner coordinatesFrame corner coordinates-The - is the extent in the x direction and . is the extent in the y direction.The - is the extent in the x direction and . is the extent in the y direction Interpolation/Euclidean (L^2) norm0(Normalize a V2 w.r.t. its Euclidean norm1 Create a V2 v$ from two endpoints p1, p2. That is v can be seen as pointing from p1 to p22 Create a V2 v$ from two endpoints p1, p2. That is v can be seen as pointing from p1 to p23Create a diagonal matrixRotation matrix4Build a  v from a #6 p (i.e. assuming v points from the origin (0,0) to p)Build a # p from a 6 v (i.e. assuming v points from the origin (0,0) to p)5Move a point along a vector6Move a  along a vector71`pointRange n p q` returns a list of equi-spaced # s between p and q.8 A list of nx by nyD points in the plane arranged on the vertices of a rectangular mesh.NB: Only the minimum x, y coordinate point is included in the output mesh. This is intentional, since the output from this can be used as an input to functions that use a corner rather than the center point as refernce (e.g. rect)9Given two frames F1 and F2, returns a function f that maps an arbitrary vector v contained within F1 onto one contained within F2.0This function is composed of three affine maps : map v into a vector v01$ that points within the unit square,map v01 onto v01'. This transformation serves to e.g. flip the dataset along the y axis (since the origin of the SVG canvas is the top-left corner of the screen). If this is not needed one can just supply the identity matrix and the zero vector,map v01' onto the target frame F2. NB: we do not check that v" is actually contained within the F1 , nor that v01'Y is still contained within [0,1] x [0, 1]. This has to be supplied correctly by the user.!Map function values across frames;X-aligned unit vector<Y-aligned unit vectorThe semigroup operation () applied on two Frames results in a new  that bounds both.,Vectors form a monoid w.r.t. vector additionVectors form an additive groupcMatrices form a monoid w.r.t. matrix multiplication and have the identity matrix as neutral elementlDiagonal matrices form a monoid w.r.t. matrix multiplication and have the identity matrix as neutral element(Diagonal matrices can always be inverted8Number of points along x axis" y axis9 Initial frame Final frameFlip L-R in [0,1] x [0,1]Flip U-D in [0,1] x [0,1]Initial vector Initial frame Final frame Initial value: Initial frame Final frameFlip L-R in [0,1] x [0,1]Flip U-D in [0,1] x [0,1]Initial Z   "!#$&%'()*+,-./0123456789:;<    !"#$%&NoneT=(`blendTwo c1 c2 n` creates a palette of n5 intermediate colours, interpolated linearly between c1 and c2.>1`palette cs n` blends linearly a list of colours cs, by generating n4 intermediate colours between each consecutive pair.@<Separate whole and decimal part of a fractional number e.g. > wholeDecimal =>?@None3F4Specify the type of connection between line segmentsKESpecify at which end should the text be anchored to its current pointO%Specify a continuous or dashed strokeR Figure dataT Figure widthU Figure heightV)Left margin fraction (w.r.t figure width)W,Right margin fraction (w.r.t figure width) X)Top margin fraction (w.r.t figure height)Y.Bottom margin fraction (w.r.t figure height) ZTick label font size[Create the SVG header\EA rectangle, defined by its anchor point coordinates and side lengths > putStrLn $ renderSvg $ rect (Point 100 200) 30 60 2 Nothing (Just C.aquamarine) <rect x="100.0" y="200.0" width="30.0" height="60.0" fill="#7fffd4" stroke="none" stroke-width="2.0" />]?A rectangle, defined by its center coordinates and side lengths > putStrLn $ renderSvg $ rectCentered 15 30 1 (Just C.blue) (Just C.red) (Point 20 30) <rect x="12.5" y="15.0" width="15.0" height="30.0" fill="#ff0000" stroke="#0000ff" stroke-width="1.0" />_Line segment between two #s > putStrLn $ renderSvg $ line (Point 0 0) (Point 1 1) 0.1 Continuous C.blueviolet <line x1="0.0" y1="0.0" x2="1.0" y2="1.0" stroke="#8a2be2" stroke-width="0.1" /> > putStrLn $ renderSvg (line (Point 0 0) (Point 1 1) 0.1 (Dashed [0.2, 0.3]) C.blueviolet) <line x1="0.0" y1="0.0" x2="1.0" y2="1.0" stroke="#8a2be2" stroke-width="0.1" stroke-dasharray="0.2, 0.3" />oAn array of axis-aligned identical segments (to be used as axis tickmarks), with centers given by the array of #s"A plot axis with labeled tickmarks > putStrLn $ renderSvg $ axis (Point 0 50) X 200 2 C.red 0.05 Continuous 15 (-45) TAEnd T.pack (V2 (-10) 0) [LabeledPoint (Point 50 1) "bla", LabeledPoint (Point 60 1) "asdf"] <line x1="0.0" y1="50.0" x2="200.0" y2="50.0" stroke="#ff0000" stroke-width="2.0" /><line x1="50.0" y1="45.0" x2="50.0" y2="55.0" stroke="#ff0000" stroke-width="2.0" /><text x="-10.0" y="0.0" transform="translate(50.0 50.0)rotate(-45.0)" font-size="15" fill="#ff0000" text-anchor="end">bla</text><line x1="60.0" y1="45.0" x2="60.0" y2="55.0" stroke="#ff0000" stroke-width="2.0" /><text x="-10.0" y="0.0" transform="translate(60.0 50.0)rotate(-45.0)" font-size="15" fill="#ff0000" text-anchor="end">asdf</text>`A pair of Cartesian axesaa) performs a number of related operations:$Maps the dataset to the figure frameRenders the X, Y axesBRenders the transformed dataset onto the newly created plot canvasee! renders text onto the SVG canvas ConventionsThe # argument p refers to the  lower-left corner of the text box.The text box can be rotated by rot degrees around p= and then anchored at either its beginning, middle or end to p with the K flag."The user can supply an additional $ displacement which will be applied afterA rotation and anchoring and refers to the rotated text box frame. > putStrLn $ renderSvg $ text (-45) C.green TAEnd "blah" (V2 (- 10) 0) (Point 250 0) <text x="-10.0" y="0.0" transform="translate(250.0 0.0)rotate(-45.0)" fill="#008000" text-anchor="end">blah</text>fA circle > putStrLn $ renderSvg $ circle (Point 20 30) 15 (Just C.blue) (Just C.red) <circle cx="20.0" cy="30.0" r="15.0" fill="#ff0000" stroke="#0000ff" />g"Polyline (piecewise straight line)  > putStrLn $ renderSvg (polyline [Point 100 50, Point 120 20, Point 230 50] 4 (Dashed [3, 5]) Round C.blueviolet) <polyline points="100.0,50.0 120.0,20.0 230.0,50.0" fill="none" stroke="#8a2be2" stroke-width="4.0" stroke-linejoin="round" stroke-dasharray="3.0, 5.0" />hA filled polyline > putStrLn $ renderSvg $ filledPolyline C.coral 0.3 [(Point 0 1), (Point 10 40), Point 34 50, Point 30 5] <polyline points="0,1 10,40 34,50 30,5" fill="#ff7f50" fill-opacity="0.3" />iAA filled band of colour, given the coordinates of its center lineThis element can be used to overlay uncertainty ranges (e.g. the first standard deviation) associated with a given data series.jA jk glyph for time series plots. This is a type of box glyph, commonly used in plotting financial time series.Some financial market quantities such as currency exchange rates are aggregated over some time period (e.g. a day) and summarized by various quantities, for example opening and closing rates, as well as maximum and minimum over the period.By convention, the j colour depends on the derivative sign of one such quantity (e.g. it is green if the market closes higher than it opened, and red otherwise).k#Move a Svg entity to a new positionlgMove point to the SVG frame of reference (for which the origing is a the top-left corner of the screen)m6Move LabeledPoint to the SVG frame of reference (uses l ) q'A colour bar legend, to be used within heatmap -style plots.Render a Colour from colour into a blaze Attribute[Image width (X axis)Image height (Y axis) Image content\WidthHeight Stroke width Stroke colour Fill colourCorner point coordinates ]WidthHeight Stroke width Stroke colour Fill colourCenter coordinates _ First point Second point Stroke width Stroke type Stroke colourLength Stroke width Font size Label angleLabel rendering Label shift Axis Length  Stroke width Stroke colourCenter coordinates Origin coordinatesAxis (i.e. either  or )Length of the axis Stroke width Stroke colour0The tick length is a fraction of the axis length Stroke typeLabel font sizeLabel rotation angle &How to anchor a text label to the axis How to render the tick label Offset the label Tick center coordinatesa  X tick label Y tick labelX label rotation angleY label rotation angle Stroke width Stroke colour X axis labels Y axis labels Data rendering function DataeRotation angle of the textbox Font size Font colour#How to anchor the text to the pointText #Displacement w.r.t. rotated textboxHInitial position of the text box (i.e. before rotation and displacement)fRadius Stroke width Stroke colour Fill colour Center g Stroke width Stroke type Stroke join type  Stroke colour Data h Fill colour Fill opacityContour point coordinatesi Fill colour Fill opacityBand maximum valueBand minimum valueCenterline pointsj FIf True, fill the box with the first colour, otherwise with the secondBox maximum valueBox minimum valueLine maximum value Line minimum value Box width Stroke widthFirst box colourSecond box colour Line stroke colour  Data pointl Initial frame Final frameFlip L-R in [0,1] x [0,1]Point in the initial frameq Figure dataPaletteWidthValue range minimumValue range maximumNumber of distinct valuesLegend position in the figureColour bar length  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKNLMOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqABCDEFGHIJKLMNOPQRSTUVWXYZNone3FTA # is given by two set of parameters:0 <= , K <= 1 : normalized coordinates of the anchor point (top-left corner) 0 <= , $ <= 1 : normalized width and height #YADG : Yet another DSL for graphicsDesign :add dataset to Plotaadd Plot to WindowState (e.g. side by side plots, inset ... by specifying a RelativeFrame for it)compute all viewpanes (i.e. to frames)+compute data transformations from viewpanesNonerA point in a time seriesv/An instant, defined by date (Day) and TimeOfDayxACreate a Tick from valid (year, month, day, hour, minute, second)zMap a Tick onto the rationals{Map a rational onto a Tick rsutvwxyz{|}~ vwxrstuyz{|}~rstuvwNone"#ب assumes the input data corresponds to evenly sampled values of a scalar-valued field, and it maps the data values onto the provided >! (which can be created e.g. with  brewerSet).! renders one SVG pixel for every  supplied as input. The s must be bounded by the .b`prepData d` assumes the input lists correspond to evenly sampled values of a scalar-valued field.zThe function extracts the pixel mesh size, the data ranges and places the data points within the unit square [0,1] x [0,1]Plot a scalar function f of points in the plane (i.e. 'f : \mathbf{R}^2 \rightarrow \mathbf{R}) Figure dataColour paletteData Figure dataColour paletteFrame containing the dataNumber of points along x axis" y axisDataData( of pixel rows, ; of pixel columns, data minimum, data maximum, data points) None None` Glyph shape"Parameters for a scatterplot glyph Scatter plotDEvery point in the plot has the same parameters, as declared in the  recordParametric scatter plotrThe parameters of every point in the scatter plot are modulated according to the label, using the three functions.|This can be used to produce rich infographics, in which e.g. the colour and size of the glyphs carry additional information.Scatterplot glyph shapesModifies the glyph sizeModifies the glyph stroke widthModifies the glyph colour Glyph style defaultsDataModifies the glyph sizeModifies the glyph stroke widthModifies the glyph colour  Legend widthData value lower boundData value upper boundNumber of legend entriesLegend position in the figure Legend lengthModifies the glyph sizeModifies the glyph stroke width Modifies the glyph colour Glyph style defaults None<:6Compute the plotting coordinates of a timeseries pointPreprocess the dataset for plotting 1. Remap the figure data to fit within the FigData ranges, expressed in pixels 2. Flip the data along the y axis since the origin in SVG is the top-left corner of the screen Create a  from a time series point (r). The t{ (time axis) field will be used for the x coordinate, whereas both fields of TsPoint may be used to create the label field.NB : The coordinates of the resulting LabelPoint still live in the original data space; they must be rescaled to fit in the figure viewport None4rstuvwxyz{|}~Marco Zocca 2017BSD3Marco Zocca <zocca marco gmail>None  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKNLMOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqq\]^f_eghnoij`aRSTUVWXYZOPQFGHIJKLMNABCDE=>p[k#$%& !"() 3';</01456:2lm79,b*+-.cd  8?@ None !"##$%&''()**+,--./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_`abcdefghijklmnopqrstuvwxyz{|}~~           %plot-light-0.3-2KuIv0uuitg9sVLvXxU6UGGraphics.Rendering.Plot.LightData.TimeSeries Data.Parsers/Graphics.Rendering.Plot.Light.Internal.Geometry,Graphics.Rendering.Plot.Light.Internal.Utils&Graphics.Rendering.Plot.Light.Internal-Graphics.Rendering.Plot.Light.Internal.Layout/Graphics.Rendering.Plot.Light.PlotTypes.Heatmap1Graphics.Rendering.Plot.Light.PlotTypes.Histogram/Graphics.Rendering.Plot.Light.PlotTypes.Scatter2Graphics.Rendering.Plot.Light.PlotTypes.TimeSeries'Graphics.Rendering.Plot.Light.PlotTypes>Graphics.Rendering.Plot.Light.PlotTypes.TimeSeries.CandlestickEps~= MatrixGroup<\>DiagMat2DMat2MultiplicativeSemigroup## LinearMap#>Mat2 Hermitian InnerProduct<.> VectorSpaceScalar.* AdditiveGroupzero^+^^-^V2AxisXYFrame_fpmin_fpmax LabeledPoint_lp_lplabelPoint_px_pyorigin labelPointmapLabelmkFrame mkFrameOriginframeFromPointswidthheightnorm2 normalize2v2fromEndpoints-.diagMat2 v2fromPoint movePointmoveLabeledPointV2 pointRangemeshGrid frameToFramemoveLabeledPointBwFramese1e2blendTwopalettetoFloat wholeDecimalLegendPosition_TopLeftTopRight BottomLeft BottomRightStrokeLineJoin_MiterRoundBevelInherit TextAnchor_TAStartTAMiddleTAEnd LineStroke_ ContinuousDashed FigureDatafigWidth figHeight figLeftMFrac figRightMFrac figTopMFracfigBottomMFracfigLabelFontSize svgHeaderrect rectCenteredsquareCenteredlineaxestoPlotframeFromFigData figFWidth figFHeighttextcirclepolylinefilledPolyline filledBand candlestick translateSvg toSvgFrame toSvgFrameLPpixelpixel' pickColour colourBarTsPointTsp_tick_valTickmkTicktickToFractionalfromTicktoTickhourTick halfHourTickquarterHourTick$fEqTick $fShowTick $fOrdTick $fEqTsPoint $fShowTsPointheatmapheatmap'plotFun2 GlyphShape_SquareCircleCrossPlusScatterPointData spGlyphShapespSize spStrokeWidthspColourscatter scatterLP scatterLPBar lift2Point lift1PointoneOnenorm2fromOrigin setPointCoord unitFramexminxmaxyminymaxinterpolateBilinearrotMtx pointFromV2frameToFrameValue $fMonoidFramebaseGHC.Basemappend $fMonoidV2$fAdditiveGroupV2 $fMonoidMat2$fMonoidDiagMat2$fMatrixGroupDiagMat2V2MeshGridmkPointpointInfpointSup setPointX setPointYmkLabeledPointmoveLabeledPoint otherAxis subdivSegment fromFrametoFrameflipLR01flipUD01rrticksaxis colourAttr labeledTicktick plusGlyph crossGlyphstrokeLineJoin legendBar RelativeFramerfXrfYrfHeightrfWidthPlotTypeFreePureRelFrameHeatMapScatter TimeSeriesmkRelativeFrame bounded01liftFprepDataHeatmaphmMesh hmPalettehmValMinhmValMax MeshGrid2dmgFramemgNxmgNy histogramglyph scatterLP1modifyScatterPointtsAxistspToLPFxRow rateCloserateLowrateHighrateOpentsAxis'labeledTsPointRangeframeToFrameFxRowc1fdat1dat1ptxptyfromto