QDpy
Loading...
Searching...
No Matches
_archive_plot.py File Reference

Matplotlib views for single and multiple QD archives. More...

Go to the source code of this file.

Classes

class  qdpy._archive_plot._Panel

Namespaces

namespace  qdpy

Functions

 qdpy._archive_plot.plot_archive (archive, *, ax=None, view="auto", dimensions=None, slice_at=None, metric="fitness", objective=0, sphere_center=(0, 0, 0), cmap="viridis", vmin=None, vmax=None, colorbar=True)
 Draw a live archive or numeric export and return its Matplotlib axes.
 qdpy._archive_plot.plot_trace_archive (archive, *, ax=None, trace_color="black", trace_alpha=.35, **options)
 Overlay one descriptor path per retained Trace-Elites measurement.
 qdpy._archive_plot.plot_archives (archives, *, shared_scale=False, panel_options=None, columns=None, colorbar=True, figsize=None, **options)
 Plot named archives side by side with individual or shared colours.
 qdpy._archive_plot.plot_archive_difference (comparison, *, labels=("Reference", "Contender"), figsize=None)
 Render occupancy, paired fitness differences, and their seed support.

Detailed Description

Matplotlib views for single and multiple QD archives.

Definition in file _archive_plot.py.

Function Documentation

◆ plot_archive()

qdpy._archive_plot.plot_archive ( archive,
* ,
ax = None,
view = "auto",
dimensions = None,
slice_at = None,
metric = "fitness",
objective = 0,
sphere_center = (0, 0, 0),
cmap = "viridis",
vmin = None,
vmax = None,
colorbar = True )

Draw a live archive or numeric export and return its Matplotlib axes.

Plot an archive using the selected descriptor axes and raw metric.

:param archive: Live container, decorator, or numeric archive JSON path.
:param ax: Optional Matplotlib axes. Use 3D axes for a spherical view.
:param view: Automatic, grid, CVT, scatter, or sphere.
:param dimensions: Descriptor indices in plot order, starting at zero.
:param slice_at: Mapping from omitted descriptor indices to fixed values.
:param metric: Fitness, occupancy count, or cell activity.
:param objective: Index of the raw fitness objective.
:param sphere_center: Three coordinates for the centre of a sphere view.
:param cmap: Matplotlib colormap.
:param vmin: Lower colour limit.
:param vmax: Upper colour limit.
:param colorbar: Show the metric scale beside the axes.
:returns: The Matplotlib axes used for the plot.

Definition at line 328 of file _archive_plot.py.

◆ plot_archive_difference()

qdpy._archive_plot.plot_archive_difference ( comparison,
* ,
labels = ("Reference", "Contender"),
figsize = None )

Render occupancy, paired fitness differences, and their seed support.

Draw the result of ``compare_archive_cells`` on a 1D or 2D grid or a 2D CVT.

Definition at line 407 of file _archive_plot.py.

◆ plot_archives()

qdpy._archive_plot.plot_archives ( archives,
* ,
shared_scale = False,
panel_options = None,
columns = None,
colorbar = True,
figsize = None,
** options )

Plot named archives side by side with individual or shared colours.

Return a figure and a mapping of archive labels to Matplotlib axes.

:param archives: Ordered mapping of labels to archives, or a sequence.
:param shared_scale: Use one colour scale for the same metric in every panel.
:param panel_options: Per-label overrides for the plot_archive view options.
:param columns: Number of panels per row.
:param colorbar: Show a colourbar or, with shared_scale, a common one.
:param figsize: Matplotlib figure size in inches.
:param options: Default view options shared by the panels.

Definition at line 390 of file _archive_plot.py.

◆ plot_trace_archive()

qdpy._archive_plot.plot_trace_archive ( archive,
* ,
ax = None,
trace_color = "black",
trace_alpha = .35,
** options )

Overlay one descriptor path per retained Trace-Elites measurement.

Plot a two-dimensional TraceArchive and its distinct measurement paths.

:param archive: TraceArchive using two descriptor coordinates.
:param ax: Optional Matplotlib axes.
:param trace_color: Matplotlib color for the retained paths.
:param trace_alpha: Opacity of each path.
:param options: Remaining plot_archive settings, such as cmap or colorbar.
:returns: Matplotlib axes containing the archive and paths.

Definition at line 362 of file _archive_plot.py.