calamari.plot.plot_boundary#
- calamari.plot.plot_boundary(fit, *, ax=None, band=True, which='stat', **style)#
Draw a
fit_boundary()model over the points it was fitted to.Points, curve and band go in the H-T plane’s fixed orientation – temperature on x, mu0 H in Tesla on y, as
draw_map()renders a map – with each point’s location on its own axis. A T-swept fit (T_Kat heldH_T) draws horizontal error bars and the curveT(H); an H-swept fit (H_Tat heldT_K) draws vertical error bars and the curveH(T). So it composes onto a map:plot_boundary(bf, ax=mesh.axes)afterplot_chi_map()orplot_moment_map()with a'linear'or'log'family scale. An'index'map places sweeps on rows, not at their field or temperature, so it is refused.The curve and its band span the used points’ held range and no further (
band): beyond the points the curve is the assumed form speaking. To draw it there, evaluateband_at()and plot that yourself, where the figure’s code says so.What is drawn: every used point, filled, with the error the fit was weighted by (the statistical error for
which='stat', statistical and systematic in quadrature for'total'), labelled with the criterion and the number of sweeps; every excluded point hollow, with the same kind of error bar, labelled'excluded by caller'; the curve, labelled with the model and the criterion; and, withband=True, the 1-sigma band on the model. Sweeps without a point get no marker, because there is nothing to place: they are the rows offit.sweepswhosestatusis neither'used'nor'excluded by caller', and the model’s value there is in theirpredicted_*column. A failed fit draws the points and no curve.- Parameters:
fit (
BoundaryFit) – Fromfit_boundary().ax (
Axes|None) – Draw into these axes; omitted, a new single-axes figure is created.band (
bool) – Draw the 1-sigma band on the model. Default True.which (
str) – The fit with statistical errors (default), or the one with statistical and systematic errors in quadrature (fit.total, present only whenyerr_syswas given).**style (
Any) – Forwarded toax.plotfor the curve. The points and the band take the curve’s colour, socolor=restyles all three.
- Return type:
- Returns:
matplotlib.axes.Axes– The axes drawn into. Axis labels are set only where the axes have none, so a map’s own labels stay. There is nolegend()call (PL-1); every artist carries a label for one.- Raises:
PlotInputError – For
whichnot'stat'or'total';'total'on a fit made without systematic errors; and axes whose label marks an'index'map. Every refusal comes before anything is drawn.