ContEx v0.2.0 Contex.PointPlot View Source
A simple point plot, plotting points showing y values against x values.
It is possible to specify multiple y columns with the same x column. It is not yet possible to specify multiple independent series.
The x column can either be numeric or date time data. If numeric, a
Contex.ContinuousLinearScale is used to scale the values to the plot,
and if date time, a Contex.TimeScale is used.
Fill colours for each y column can be specified with colours/2.
A column in the dataset can optionally be used to control the colours. See
colours/2 and set_colour_col_name/2
Link to this section Summary
Functions
Set the colour palette for fill colours.
Sets the default values for the plot.
Create a new point plot definition and apply defaults.
If a single y column is specified, it is possible to use another column to control the point colour.
Specify which column in the dataset is used for the x values.
Specify which column(s) in the dataset is/are used for the y values.
Link to this section Functions
colours(plot, colour_palette)
View Sourcecolours(Contex.PointPlot.t(), Contex.CategoryColourScale.colour_palette()) :: Contex.PointPlot.t()
Set the colour palette for fill colours.
Where multiple y columns are defined for the plot, a different colour will be used for each column.
If a single y column is defined and a colour column is defined (see set_colour_col_name/2),
a different colour will be used for each unique value in the colour column.
If a single y column is defined and no colour column is defined, the first colour in the supplied colour palette will be used to plot the points.
defaults(plot)
View Sourcedefaults(Contex.PointPlot.t()) :: Contex.PointPlot.t()
Sets the default values for the plot.
By default, the first column in the dataset is used for the x values and the second column for the y values.
The colour palette is set to :default.
Create a new point plot definition and apply defaults.
set_colour_col_name(plot, colour_col_name)
View Sourceset_colour_col_name(Contex.PointPlot.t(), Contex.Dataset.column_name()) :: Contex.PointPlot.t()
If a single y column is specified, it is possible to use another column to control the point colour.
Note: This is ignored if there are multiple y columns.
set_x_col_name(plot, x_col_name)
View Sourceset_x_col_name(Contex.PointPlot.t(), Contex.Dataset.column_name()) :: Contex.PointPlot.t()
Specify which column in the dataset is used for the x values.
This column must contain numeric or date time data.
set_y_col_names(plot, y_col_names)
View Sourceset_y_col_names(Contex.PointPlot.t(), [Contex.Dataset.column_name()]) :: Contex.PointPlot.t()
Specify which column(s) in the dataset is/are used for the y values.
These columns must contain numeric data.
Where more than one y column is specified the colours are used to identify data from each column.