morphogen.viz.export

Figures as files: bitmaps (.png, .tif/.tiff), vector graphics (.svg, .pdf, .eps) and TikZ (.tex, .tikz): the pgfplots code of a matplotlib figure, for LaTeX documents.

The TikZ code has one axis per axes of the figure, placed as in the figure, with its labels, title, limits, scales, ticks and legend: the lines (plot) as coordinates, the markers of scatter plots, line collections (frames, contours) as coordinate lists cut by nan (unbounded coords=jump), filled rectangles (axhspan, bars) and polygons as filled paths, texts as nodes, and images (slices, maps) as PNG files beside the .tex (\addplot graphics). Use it with \usepackage{pgfplots}, \pgfplotsset{compat=1.18}.

morphogen.viz.export.save_figure(fig, path, *, dpi: int = 200, transparent: bool = False) → Path[source]

Save a matplotlib figure by the suffix of path: bitmaps at dpi, vector graphics, or the TikZ code of tikz() (its images beside it).

morphogen.viz.export.tikz(fig, path=None) → str[source]

The pgfplots code of a matplotlib figure (see the module); its images are written as PNG files beside path (by default figure.tex in the working directory).