chartcontainer

class camelot.container.chartcontainer.AxesContainer[source]

A container that is able to generate a plot on a matplotlib axes. Methods can be called on this class as if it were a matplotlib Axes class. All method calls will be recorded. Of course the methods won’t return matplotlib objects. The set_auto_legend method can be used to turn legens on without the need for matplotlib objects.

plot_on_axes(ax)[source]

Replay the list of stored commands to the real Axes object

set_auto_legend(auto_legend)[source]

Specify if the container should try to put a legend on the plot. :param auto_legend: True or False

class camelot.container.chartcontainer.AxesMethod(method_name, commands)[source]

Helper class to substitute a method on an Axes object and record its calls

class camelot.container.chartcontainer.FigureContainer(axes)[source]

A container that is able to plot itself on a matplotlib figure canvas.

Its ‘plot_on_figure’ method will be called in the gui thread to fill the figure canvas.

One figure canvas can contain multiple axes (=sub plots)

plot_on_figure(fig)[source]

Draw all axes (sub plots) on a figure canvas

camelot.container.chartcontainer.structure_to_figure_container(structure)[source]

Convert a structure to a figure container, if the structure is an instance of a FigureContainer, return as is.

If the structure is an instance of an AxesContainer, return a FigureContainer with a single Axes.

If the structure is a list, use the structure as a constructor argument for the FigureContainer

Previous topic

container

Next topic

core

This Page