Functions
Plotting functions
StatisticalGraphics.sggrid — Functionsggrid(sgps...; opts...)Position a collection of SG plots within a grid. The opts... refers to extra keyword arguments which can be passed to sggrid.
Keyword arguments
Plot appearance
align: Determine how to align plots. It can be one of:all,:each, or:none. default::nonebackcolor: The back color.bordercolor: The color for the border of plots. default::transparentbounds: One of:fullor:flush. Seevegadocs for more information. default::fullcenter: The row and column centering, respectively. default:Bool[0, 0]columns: Number of columns to be created.columnspace: Space between columns. default:0rowspace: Space between rows. default:0
StatisticalGraphics.sgplot — Functionsgplot(ds, plots;
mapformats=true,
nominal=nothing,
xaxis=Axis(),
x2axis=Axis(),
yaxis=Axis(),
y2axis=Axis(),
legend=true,
threads=automatic,
opts...)Produce a statistical graphics. The ds argument is referring to a data set (or grouped data set) and plots is a vector of marks, such as Bar, Pie,....
The opts... refers to extra keyword arguments which can be passed to sgplot. These keywords depend depend whether ds is a data set or a grouped data set. Below shows the available keyword arguments for each case.
Non-grouped data sets
Keyword arguments
Plot appearance
backcolor: The backgroud color for whole graph. default::whiteclip: The clip option for whole plot. default:truefont: The default font. default:"sans-serif"fontweight: The font weight value. default:400groupcolormodel: The color model to be used whengroupis used for specific plot. default::categoryheight: The width of plot. default:400italic: The default value whether the package use italic fonts. default:falsewallcolor: The backgroud color for plot area. default::transparentwidth: The width of plot. default:600
Grouped data sets
Save figures
StatisticalGraphics.pdf — Functionpdf(filename::AbstractString, v::SGPlots; s=1)Save the plot v as a pdf file with name filename. The s keyword can be used to scale the output.
StatisticalGraphics.png — Functionpng(filename::AbstractString, v::SGPlots; s=1)Save the plot v as a png file with name filename. The s keyword can be used to scale the output.
StatisticalGraphics.savefig — Functionsavefig(filename::AbstractString, v::SGPlots; s = 1)Save the plot v as a file with name filename. The file format will be picked based on the extension of the filename.
StatisticalGraphics.svg — Functionsvg(filename::AbstractString, v::SGPlots; s=1)Save the plot v as a svg file with name filename. The s keyword can be used to scale the output.
Miscellaneous
StatisticalGraphics.gradient — Functiongradient([colors...]; direction = [0,1,0,0])A linear gradient interpolates colors along a line, from a starting point to an ending point. By default a linear gradient runs horizontally, from left to right. Use the direction to configure the gradient direction, e.g. [0,0,0,1] runs the gradient vertically. All coordinates are defined in a normalized [0, 1] coordinate space, relative to the bounding box of the item being colored.
Examples
gradient()
gradient(:red, :white, :blue)