ViolinPlot

Package: Libraries.Interface.Controls.Charts · Inherits from: Libraries.Interface.Controls.Charts.Chart, Libraries.Interface.Controls.Control, Libraries.Interface.Item, Libraries.Interface.Controls.Charts.ChartItem, Libraries.Interface.Item2D, Libraries.Language.Object

The ViolinPlot class is Chart object that inherits from Control and like other UI elements it is added to the Game class. The Violin Plot is used as an indication of how the values in the data are spread out. Violin Plots can also be used to compare datasets for more than one group. The title label, axis labels, and scales can be modified. Any number of plots can be added.

Example Code

use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.ViolinPlot

DataFrame frame
frame:Load("Data.csv")
frame:AddSelectedColumn(1)
ViolinPlot chart = frame:ViolinPlot()
chart:SetTitle("My Awesome Title")
chart:Display()

Actions

AddChartItemInstructions(Libraries.Interface.Item chartItem, text description)

This action generates the instruction text for a chart item description.

Parameters

  • chartItem Libraries.Interface.Item: The chart item that will have the instructions
  • description text: The base portion of the description that will appear before the instructions

AddPlotGroup(Libraries.Interface.Controls.Charts.Graphics.PlotGroup group)

Appends a new plotgroup.

Parameters

AddPlotItemInstructions(Libraries.Interface.Item chartItem, text description)

This action generates the instruction text for a plot item description.

Parameters

  • chartItem Libraries.Interface.Item: The chart item that will have the instructions
  • description text: The base portion of the description that will appear before the instructions

ConvertToScalableVectorGraphics()

This action converts this chart to a text value that contains information for a scalable vector graphics file. This is useful for saving charts to disk. Each sub-class of chart must implement this action separately.

Returns

text: the Scalable Vector Graphics (SVG) text.

DisposeDrawables()

DisposeDrawables Empties drawables from the chart area.

GenerateInfoTree()

GenerateInfoTree Generates the tree of ChartItems that define how the chart will be navigated and what extra information might be sent to the screen reader.

GenerateSummary()

This is called by GenerateInfoTree to generate the summary that is heard when you first focus on the chart. Also the highest level of the information tree of the chart.

Returns

text

GetBandWidth()

This returns the inteval size to calculate the normal distributions

Returns

number

GetChartItemText()

This action gets the chart item text.

Returns

text

GetChartItemsText()

This action gets the chart items text.

Returns

text

GetGroupText()

This action gets the group text.

Returns

text

GetGroupsText()

This action gets the groups text.

Returns

text

GetNumberOfPlots()

Returns the number of boxes currently added to the Box Plot

Returns

integer

GetPlotGroups()

Returns an array of all the plot groups

Returns

Libraries.Containers.Array<Libraries.Interface.Controls.Charts.Graphics.PlotGroup>

GetSplitFlag()

Returns the split plot flag

Returns

boolean

GetWindowingAction()

This gets what kind of kernel function that is used to calculate the normal distributions

Returns

Libraries.Compute.Statistics.Analysis.UnivariateAction

LoadChartAreaItems()

LoadGraphics This action is used to load the graphical components of the Control. This is handled automatically by the Game engine as needed, and most users shouldn't need to use this action directly.

LoadGraphics(Libraries.Interface.Layouts.LayoutProperties properties)

LoadGraphics This action is used to load the graphical components of the Control. This is handled automatically by the Game engine as needed, and most users shouldn't need to use this action directly.

Parameters

LostSelection(Libraries.Interface.Controls.Charts.ChartItem ci)

LostSelection is a supplemental action to the parent Chart's LostSelection. Any items specific to only this type of chart or if an item needs different highlighting instructions than that of the parent class, it will have their LostSelection defined here. Unlike many kinds of user interface controls, there is no universal way of interacting with a chart and, as such, this may be defined by any chart to be custom. As such, charts must be able to take messages suggesting an item in the chart has either lost or gained the focus. Broadly speaking, this is done automatically and while charts need to implement this action, they do not need to call this action directly.

Parameters

OnSelectionChange(Libraries.Interface.Controls.Charts.ChartItem item)

OnSelectionChange is a supplemental action to the parent Chart's OnSelectionChange. Any items specific to only this type of chart or if an item needs different highlighting instructions than that of the parent class, it will have their GainedSelection defined here. Unlike many kinds of user interface controls, there is no universal way of interacting with a chart and, as such, this may be defined by any chart to be custom. As such, charts must be able to take messages suggesting an item in the chart has either lost or gained the focus. Broadly speaking, this is done automatically and while charts need to implement this action, they do not need to call this action directly.

Parameters

Save(Libraries.System.File file)

This action saves this chart to disk at the position of the current file. To conduct the conversion, the file extension is used. Only Scalable Vector Graphics (SVG) is currently supported.

Parameters

SetBandWidth(number value)

This sets the inteval size to calculate the normal distributions

Parameters

  • value number

SetWindowingAction(Libraries.Compute.Statistics.Analysis.UnivariateAction act)

This sets what kind of kernel function to use to calculate the normal distributions

Parameters

SetXAxisMaximum(number max)

Max and min value will track the highest and lowest values and limit the axis controls to not pass that value.

Parameters

  • max number

SetXAxisMinimum(number min)

Set the x axis minumum for the violin plot. Attribute Parameter min the min value on the axis.

Parameters

  • min number

SetYAxisMaximum(number max)

Set the y axis maximum for the violin plot. Attribute Parameter max the maximum value on the axis.

Parameters

  • max number

SetYAxisMinimum(number min)

Set the y axis minumum for the violin plot. Attribute Parameter min the min value on the axis

Parameters

  • min number

Share(Libraries.System.File file)

This action saves this chart to disk at the position of the current file. To conduct the conversion, the file extension is used. Only Hypertext Markup Language (HTML) is currently supported, and Scalable Vector Graphics (SVG) conversion is used. This makes a file that can be opened in the browser that imports the Javascript and Cascading Stylesheets necessary to navigate the charts accessibly on the web.

Parameters

SplitPlot(boolean flag)

Sets a flag that determines if a plot should be split for 2 column, one factor

Parameters

  • flag boolean

Inherited Actions

258 actions from Libraries.Interface.Controls.Charts.Chart
24 actions from Libraries.Interface.Controls.Charts.ChartItem
257 actions from Libraries.Interface.Controls.Control
59 actions from Libraries.Interface.Item
201 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object