quimb.utils_plot ================ .. py:module:: quimb.utils_plot Attributes ---------- .. autoapisummary:: quimb.utils_plot.NEUTRAL_STYLE Functions --------- .. autoapisummary:: quimb.utils_plot.default_to_neutral_style quimb.utils_plot._ensure_dict quimb.utils_plot.plot quimb.utils_plot.plot_multi_series_zoom quimb.utils_plot._progress_log_file quimb.utils_plot.load_progress_log quimb.utils_plot.plot_progress_log Module Contents --------------- .. py:data:: NEUTRAL_STYLE .. py:function:: default_to_neutral_style(fn) Wrap a function or method to use the neutral style by default. .. py:function:: _ensure_dict(k, v) .. py:function:: plot(*args, **kwargs) Wrapper around `matplotlib.pyplot.plot` to use the neutral style by default (`style="neutral") as well as showing and closing the plot by default (`show_and_close=True`). .. py:function:: plot_multi_series_zoom(data, zoom='auto', zoom_max=100, zoom_marker='|', zoom_markersize=3, xlabel='Iteration', width=8, height=None, figsize=None, **kwargs) Plot possibly multiple series of data, using the asinh scale for an overview and a linear scale for a zoomed in final section. :param data: The data to plot. :type data: dict[dict], dict[array], dict, array, optional .. py:function:: _progress_log_file(path) Resolve ``path``, which can be a log directory or the file itself, to the progress file. .. py:function:: load_progress_log(path) Load the progress data written by a running TEBD or simple update evolution, see :meth:`quimb.tensor.tnag.tebd.TEBDSweepMixin.write_progress_log`. :param path: Either the log directory the run was given, or the ``"progress.json"`` file within it. :type path: str or pathlib.Path :returns: With keys ``"cls"``, ``"info"``, ``"time"``, ``"elapsed"``, ``"running"`` and ``"data"``, the last being the series to plot. :rtype: dict .. py:function:: plot_progress_log(path, watch=False, interval=1.0, **kwargs) Plot the progress of a TEBD or simple update evolution, which can still be running, possibly in another process. :param path: Either the log directory the run was given, or the ``"progress.json"`` file within it. :type path: str or pathlib.Path :param watch: Whether to keep reloading and redrawing until the run reports that it has finished. Only redraws when the file has actually been rewritten. Intended for use in a notebook. :type watch: bool, optional :param interval: How many seconds to wait between checks when watching. :type interval: float, optional :param kwargs: Supplied to :func:`plot_multi_series_zoom`. :returns: **fig, axs** :rtype: matplotlib.Figure, tuple[matplotlib.Axes]