Contex.Plot (ContEx v0.4.0) View Source
Manages the layout of various plot elements, including titles, axis labels, legends etc and calculates appropriate margins depending on the options set.
Link to this section Summary
Functions
Updates attributes for the plot. Takes a keyword list of attributes, which can include both "plot options"
items passed individually as well as :title
, :subtitle
, :x_label
and :y_label
.
Sets the x-axis & y-axis labels for the plot. Empty string or nil will remove them.
Replaces the plot dataset and updates the plot content. Accepts a dataset or a list of lists/tuples representing the new data. The plot's dataset's original headers are preserved.
Replaces the plot dataset and updates the plot content. Accepts list of lists/tuples representing the new data and a list of strings with new headers.
Creates a new plot with specified plot content.
Creates a new plot with specified dataset and plot type. Other plot attributes can be set via a keyword list of options.
Updates plot options for the plot.
Updates the size for the plot
Sets the title and sub-title for the plot. Empty string or nil will remove the title or sub-title
Generates SVG output marked as safe for the configured plot.
Generates a complete XML document string.
Link to this section Types
Link to this section Functions
Specs
Updates attributes for the plot. Takes a keyword list of attributes, which can include both "plot options"
items passed individually as well as :title
, :subtitle
, :x_label
and :y_label
.
Specs
Sets the x-axis & y-axis labels for the plot. Empty string or nil will remove them.
Specs
dataset(t(), Contex.Dataset.t() | [row()]) :: t()
Replaces the plot dataset and updates the plot content. Accepts a dataset or a list of lists/tuples representing the new data. The plot's dataset's original headers are preserved.
Specs
Replaces the plot dataset and updates the plot content. Accepts list of lists/tuples representing the new data and a list of strings with new headers.
Specs
new(integer(), integer(), Contex.PlotContent.t()) :: t()
Creates a new plot with specified plot content.
Specs
Creates a new plot with specified dataset and plot type. Other plot attributes can be set via a keyword list of options.
Updates plot options for the plot.
Specs
Updates the size for the plot
Specs
Sets the title and sub-title for the plot. Empty string or nil will remove the title or sub-title
Generates SVG output marked as safe for the configured plot.
Specs
Generates a complete XML document string.