# texfigure: Python Helpers for PythonTeX¶

texfigure is a package designed to make it easier to work with matplotlib and other figures inside PythonTeX documents.

# texfigure Package¶

texfigure is a package of PythonTeX helpers for managing matplotlib plots.

Importing texfigure will set your matplotlib backend to pgf, therefore import texfigure should come before any other matplotlib imports.

## Functions¶

 configure_latex_plots(pytex[, font_size]) Configure a sane set of latex defaults for pgf figure generation. figsize(pytex[, scale, height_ratio, ...]) A helper for calculating figure sizes based upon latex page widths. repr_latex_formatter(obj) test([package, test_path, args, plugins, ...]) Run the tests using py.test.

## Classes¶

 Figure(file_name[, reference]) A class for holding a figure file, that knows how to represent itself as a latex environment. Manager(pytex, base_path[, number, ...]) A class holding information about different figures and data. MultiFigure(nrows, ncols[, reference, ...]) A Multifigure is a container object for building subfigures from texfigure.Figure classes.