View Source Contex.Plot (ContEx v0.5.0)
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
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.
@spec 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.
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.
@spec new(integer(), integer(), Contex.PlotContent.t()) :: t()
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.