Distribution of a value in 2D qubit lattice as a color map.
cirq.vis.Heatmap(
value_map: Mapping[cirq.vis.heatmap.QubitTuple
, SupportsFloat],
**kwargs
)
Args |
value_map
|
dictionary
A dictionary of QubitTuples as keys and corresponding magnitude as float values. It
corresponds to the data which should be plotted as a heatmap.
|
title
|
str, default = None
|
plot_colorbar
|
bool, default = True
|
annotation_map
|
dictionary,
A dictionary of QubitTuples as keys and corresponding annotation str as values. It
corresponds to the text that should be added on top of each heatmap polygon unit.
|
annotation_format
|
str, default = '.2g'
Formatting string using which annotation_map will be implicitly contstructed by
applying format(value, annotation_format) for each key in value_map.
This is ignored if annotation_map is explicitly specified.
|
annotation_text_kwargs
|
Matplotlib Text **kwargs,
|
colorbar_position
|
{'right', 'left', 'top', 'bottom'}, default = 'right'
|
colorbar_size
|
str, default = '5%'
|
colorbar_pad
|
str, default = '2%'
|
colorbar_options
|
Matplotlib colorbar **kwargs, default = None,
|
colormap
|
Matplotlib colormap, default = viridis
vmin, vmax: colormap scaling floats, default = None
|
Methods
plot
View source
plot(
ax: Optional[plt.Axes] = None,
**collection_options
) -> Tuple[plt.Axes, mpl_collections.Collection]
Plots the heatmap on the given Axes.
Args |
ax
|
the Axes to plot on. If not given, a new figure is created,
plotted on, and shown.
|
collection_options
|
keyword arguments passed to mcoll.PolyCollection().
|
Returns |
A 2-tuple (ax, collection) . ax is the plt.Axes that
is plotted on. collection is the collection of paths drawn and filled.
|
update_config
View source
update_config(
**kwargs
) -> "Heatmap"
Add/Modify **kwargs args passed during initialisation.