triqs.plot

Matplotlib helpers and a generic plot protocol for TRIQS objects.

This package is organised in two layers:

  • triqs.plot.protocol defines the plot protocol, a uniform way for TRIQS objects to describe themselves to a plotting backend. An object participates by either implementing _plot_(opt_dict) or by registering a free function in triqs.plot.protocol.plot_function_table.

  • triqs.plot.mpl_interface provides oplot(), a thin matplotlib wrapper that consumes the plot protocol so that Green’s functions, histograms, lattice objects and plain arrays can all be passed to the same plotting call.

Typical usage:

>>> from triqs.plot.mpl_interface import oplot, plt
>>> oplot(g, mode='R')
>>> plt.show()

Modules

mpl_interface

Matplotlib front-end for the TRIQS plot protocol.

protocol

Definition of the TRIQS plot protocol.