4       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe Safe 6;<=>?FTPANumerical 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 label2)Build a frame rooted at the origin (0, 0)3The unit square (0, 0) - (1, 1)4 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) P5Frame corner coordinates6Frame corner coordinates7Frame corner coordinates8Frame corner coordinates9The 9 is the extent in the x direction and : is the extent in the y direction:The 9 is the extent in the x direction and : is the extent in the y direction; InterpolationSafeUnsafe=Euclidean (L^2) norm>(Normalize a V2 w.r.t. its Euclidean norm? Create a V2 v$ from two endpoints p1, p2. That is v can be seen as pointing from p1 to p2@ Create a V2 v$ from two endpoints p1, p2. That is v can be seen as pointing from p1 to p2ACreate a diagonal matrixRotation matrixBBuild a  v from a #6 p (i.e. assuming v points from the origin (0,0) to p)CBuild a # p from a 6 v (i.e. assuming v points from the origin (0,0) to p)DMove a point along a vectorEMove a  along a vectorF1`pointRange n p q` returns a list of equi-spaced # s between p and q.G 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)IGiven 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.J!Map function values across framesLX-aligned unit vectorMY-aligned unit vectorQThe semigroup operation () applied on two Frames results in a new  that bounds both.R,Vectors form a monoid w.r.t. vector additionTVectors form an additive groupWcMatrices form a monoid w.r.t. matrix multiplication and have the identity matrix as neutral element]lDiagonal matrices form a monoid w.r.t. matrix multiplication and have the identity matrix as neutral element_(Diagonal matrices can always be invertedGNumber of points along x axis" y axisI Initial frame Final frameFlip L-R in [0,1] x [0,1]Flip U-D in [0,1] x [0,1]Initial vectorJ Initial frame Final frame Initial valueK Initial frame Final frameFlip L-R in [0,1] x [0,1]Flip U-D in [0,1] x [0,1]Initial N  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN#$%&'*+ !",-/1342:956780<C A()LM=>?BD.EK@FIJ  GH;    !"#$%&NoneZv(`blendTwo c1 c2 n` creates a palette of n5 intermediate colours, interpolated linearly between c1 and c2.w1`palette cs n` blends linearly a list of colours cs, by generating n4 intermediate colours between each consecutive pair.x"Convert a floating point value in  form to y<Separate whole and decimal part of a fractional number e.g. )> wholeDecimal pi (3,0.14159265358979312)vwxyNone36,4Specify the type of connection between line segmentsESpecify at which end should the text be anchored to its current point%Specify a continuous or dashed stroke Stroke width  Stroke type Stroke colour=A shape can either be only filled, or only contoured, or bothOnly fill colour!Only border colour + stroke widthFill and border coloursA Col is both a Colour# and an alpha (opacity) coefficient Figure data Figure width Figure height)Left margin fraction (w.r.t figure width),Right margin fraction (w.r.t figure width) )Top margin fraction (w.r.t figure height).Bottom margin fraction (w.r.t figure height) Tick label font sizeCreate the SVG headerFull opacity colourHalf opacity colourSet the fill and stroke colour and opacity attributes all at once (e.g. if the fill is set to invisible, the stroke must be visible somehow.EA rectangle, defined by its anchor point coordinates and side lengths > putStrLn $ renderSvg $ rect 50 60 (shapeColNoBorder C.blue 0.5) (Point 100 30) <rect x="100.0" y="30.0" width="50.0" height="60.0" fill-opacity="0.5" fill="#0000ff" stroke="none" />?A rectangle, defined by its center coordinates and side lengths T> putStrLn $ renderSvg $ rectCentered 15 30 (Just C.blue) (Just C.red) (Point 20 30);A square, defined by its center coordinates and side lengthLine options "picker". Creates an unbounded stream of LineOptions, may be useful when plotting multiple timeseries (essentially imitating the Matlab behaviour)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 axes) 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 canvas! 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  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>A circle > putStrLn $ renderSvg $ circle 15 (shapeColBoth C.red C.blue 1 5) (Point 10 20) <circle cx="10.0" cy="20.0" r="15.0" fill-opacity="1.0" fill="#ff0000" stroke-opacity="1.0" stroke="#0000ff" stroke-width="5.0" />"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" />A 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" />AA 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.A k 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  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).#Move a Svg entity to a new positiongMove point to the SVG frame of reference (for which the origing is a the top-left corner of the screen)6Move LabeledPoint to the SVG frame of reference (uses  ) \Pick a colour from a list, assumed to be a palette mapped onto a compact numerical interval.'A colour bar legend, to be used within heatmap -style plots.Render a Colour from colour into a blaze AttributeImage width (X axis)Image height (Y axis) Image content Fill colour Stroke colourOpacity  Stroke widthWidth Stroke width Colour and alpha informationCorner point coordinatesWidthHeightColour and alpha informationCenter coordinates  Side lengthColour and alpha informationCenter coordinates First point Second point Stroke width Stroke type Stroke colourWidth Stroke widthWidth Stroke widthLength Stroke width Font size Label angleLabel rendering function 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 coordinates  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 DataRotation 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)Radius Center  Stroke width Stroke type Stroke join type  Stroke colour Data  Fill colour Fill opacityContour point coordinates Fill colour Fill opacityBand maximum valueBand minimum valueCenterline points 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 point Initial frame Final frameFlip L-R in [0,1] x [0,1]Point in the initial framePaletteWidthHeight Figure dataPaletteWidthValue range minimumValue range maximumNumber of distinct valuesLegend position in the figureColour bar length  !"#$%&'(,-/123456789:;=>?@ABDEFGHIJKLMvwxyz{|}~z{|}~None3FTA # 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 viewpanes NoneݫA point in a time series/An instant, defined by date (Day) and TimeOfDayACreate a Tick from valid (year, month, day, hour, minute, second)Map a Tick onto the rationalsMap a rational onto a Tick None"# assumes the input data corresponds to evenly sampled values of a scalar-valued field, and it maps the data values onto the provided w! (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<uUniform, un-weighted bins NoneX 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 colourGlyph style defaultsDataModifies the glyph sizeModifies the glyph stroke widthModifies the glyph colourModifies the glyph opacity  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 Modifies the glyph opacity Glyph style defaultsModifies glyph sizeModifies glyph stroke widthModifies glyph colourModifies glyph opacityWidth Stroke width Glyph shape Glyph colourOpacityPosition 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 (). The { (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 !"#$%&'( None7 !"#$%&'(Marco Zocca 2017BSD3Marco Zocca <zocca marco gmail>None ^ !"#$%&-/1249:Gvwxyz{|}~^z{|}~4129:vw#$%& !"-/Gxy None ) !"##$%&''()**+,--./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                        ! " # $ % & ' ( ) * + , - ./%plot-light-0.4-COTd3azJTzy96UzmLTgArh/Graphics.Rendering.Plot.Light.Internal.GeometryGraphics.Rendering.Plot.LightData.TimeSeries Data.Parsers,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_pymkPointoriginoneOne setPointX setPointYmkLabeledPoint labelPointmoveLabeledPointmapLabelisPointInFramemkFrame mkFrameOrigin unitFrameframeFromPointsxminxmaxyminymaxwidthheightinterpolateBilinear otherAxisnorm2 normalize2v2fromEndpoints-.diagMat2 v2fromPoint pointFromV2 movePointmoveLabeledPointV2 pointRangemeshGrid subdivSegment frameToFrameframeToFrameValuemoveLabeledPointBwFramese1e2 $fShowPoint $fOrdPoint $fMonoidFrame$fSemigroupFrame $fMonoidV2 $fSemigroupV2$fAdditiveGroupV2$fVectorSpaceV2 $fHermitianV2 $fMonoidMat2$fLinearMapMat2V2$fSemigroupMat2$fMultiplicativeSemigroupMat2$fLinearMapDiagMat2V2!$fMultiplicativeSemigroupDiagMat2$fMonoidDiagMat2$fSemigroupDiagMat2$fMatrixGroupDiagMat2V2$fEpsV2$fEpsV20 $fEpsFloat $fEpsDouble $fEqPoint$fGenericPoint$fEqLabeledPoint$fShowLabeledPoint $fEqFrame $fShowFrame$fGenericFrame$fEqAxis $fShowAxis$fEqV2$fShowV2$fEqMat2 $fShowMat2 $fEqDiagMat2$fShowDiagMat2 $fEqMeshGrid$fShowMeshGrid$fGenericMeshGridblendTwopalettetoFloat 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 spStrokeWidthspColourspAlphascatter scatterLP scatterLPBar lift2Point lift1Pointnorm2fromOrigin setPointCoordinterpolateBilinear'rotMtxbaseGHC.BasemappendMeshGrid'scientific-0.3.5.2-HPE8LSeKW1DmhBXwWvUQData.Scientific Scientificghc-prim GHC.TypesFloatrr loStrokeWidth loStrokeTypeloColourShapeCol NoBorderCol NoFillColBothColColcol100col50!#lineOptionCycleticksaxis colourAttr shapeColBoth plusGlyph crossGlyph labeledTickcColourcAlphacolshapeColNoBordershapeColNoFilltickstrokeLineJoin legendBar LineOptions RelativeFramerfXrfYrfHeightrfWidthPlotTypeRelFrameHeatMapScatter TimeSeriesmkRelativeFrame bounded01prepDataHeatmaphmMesh hmPalettehmValMinhmValMax MeshGrid2dmgFramemgNxmgNyhisto histogramhisto''glyph scatterLP1modifyScatterPointtsAxistspToLPFxRow rateCloserateLowrateHighrateOpentsAxis'labeledTsPointRangeframeToFrameFxRowc1fdat1dat1ptxptyfromto