triqs.plot.mpl_interface.oplot
- triqs.plot.mpl_interface.oplot(obj, *opt_list, axes=None, **opt_dict)[source]
Plot a protocol-aware object onto a matplotlib axes.
Thin wrapper around
matplotlib.pyplot.plot()that dispatchesobjthroughtriqs.plot.protocol.plot_protocol_apply(), iterates over the curve dictionaries it returns, and forwards each to the appropriate matplotlib drawing function (plot,bar, …). Axis labels, title, ticks and legend toggles encoded in the curve dictionaries are applied toaxes.- Parameters:
- objobject
Object to plot. Anything accepted by
plot_protocol_apply(): a TRIQS object implementing the plot protocol, a numpy array, a callable sampled on the current x-window, or an iterable of(x, y)pairs.- *opt_list
Extra positional arguments forwarded to the matplotlib drawing call (e.g. a format string
'r--').- axesmatplotlib.axes.Axes, optional
Axes to draw on. Defaults to
plt.gca().- **opt_dict
Keyword options. Protocol-specific keys (e.g.
mode,x_window,name) are consumed by the dispatch inplot_protocol_apply(); remaining keys are forwarded to the matplotlib drawing call.
- Raises:
- RuntimeError
If a forwarded keyword is neither understood by the object’s plot protocol nor a valid matplotlib line property.