chartcontainer — Camelot documentation

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- container »

# chartcontainer

class `camelot.container.chartcontainer.` `AxesContainer`

  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)

    Replay the list of stored commands to the real Axes object

  `set_auto_legend`(auto_legend)

    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)

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

class `camelot.container.chartcontainer.` `FigureContainer`(axes)

  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)

    Draw all axes (sub plots) on a figure canvas

`camelot.container.chartcontainer.` `structure_to_figure_container`(structure)

  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

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- container »

Comments
blog comments powered by Disqus