viz.py¶
Viz
¶
Provide a visualization class.
Parameters:
-
(dpi¶int, default:150) –set resolution for rasterized images
-
(font_size¶int, default:11) –set mpl default font size
-
(font_family¶str, default:'Arial') –set mpl default font family
Attributes:
-
dpi(int) –rasterization resolution
-
fdict((dict) –dictionary to which each figure is appended as it is generated
Methods:
-
create_figure–Initialize a Pyplot figure.
-
image_lattice–Plot colorized image of lattice.
-
image_lattice_history–Plot colorized image of 1d lattice history.
-
plot_ρmean–Plot time evolution of mean order parameter.
Source code in python/dprs/viz.py
create_figure
¶
create_figure(
fig_name: str, fig_size: tuple[float, float] | None = None, dpi: int | None = None
) -> Figure
Initialize a Pyplot figure.
Set its size and DPI. Append it to the figures dictionary.
Parameters:
-
(fig_name¶str) –name of figure; used as key in figures dictionary
-
(fig_size¶tuple[float, float] | None, default:None) –optional width and height of figure in inches
-
(dpi¶int | None, default:None) –rasterization resolution
Returns:
-
figure(Figure) –reference to MatPlotLib/Pyplot figure
Source code in python/dprs/viz.py
image_lattice
¶
image_lattice(
name: str,
title: str,
lattices: NDArray | None,
p: Parameters,
i_lattice: int | None = 0,
x: int | None = None,
y: int | None = None,
z: int | None = None,
fig_size: tuple[float, float] = (6, 4),
) -> tuple[Figure, Any]
Plot colorized image of lattice.
Source code in python/dprs/viz.py
image_lattice_history
¶
image_lattice_history(
name: str,
title: str,
lattices: NDArray | None,
p: Parameters,
x: int | None = None,
t: int | None = None,
fig_size: tuple[float, float] = (6, 4),
) -> tuple[Figure, Any]
Plot colorized image of 1d lattice history.
Source code in python/dprs/viz.py
plot_ρmean
¶
plot_ρmean(
name: str,
title: str,
tracking: NDArray,
δ: float,
ρ_mean_ref: float,
fig_size: tuple[float, float] = (6, 4),
i_offset: int = 3,
do_ref_curve: bool = True,
) -> tuple[Figure, Any]
Plot time evolution of mean order parameter.