def plot_concept_list(constellation, fig=None, **kwargs):
"""Vertically stack a constellation's concept plots (uses `plot_concept`).
Examples:
>>> big_mip = pyphi.compute.big_mip(sub)
>>> plot_concept_list(big_mip.unpartitioned_constellation,
title_fmt='MP', state_fmt='1')
>>> matplotlib.pyplot.show()
Args:
constellation (list(pyphi.models.Concept)): A list of concepts to plot.
Keyword args:
fig (matplotlib.Figure): A figure on which to plot. If *None*, a new
figure is created and used. Default *None*.
Any unmatched kwargs are passed to `plot_concept`.
"""
DEFAULT_WIDTH = 8 # in inches
DEFAULT_CONCEPT_HEIGHT = 1.75 # in inches
n_concepts = len(constellation)
if fig is None:
fig = plt.figure(1, (DEFAULT_WIDTH, DEFAULT_CONCEPT_HEIGHT * n_concepts))
gs = gridspec.GridSpec(n_concepts, 1)
for concept_idx in range(n_concepts):
plot_concept(constellation[concept_idx],
fig=fig,
subplot_spec=gs[concept_idx, 0],
**kwargs)
fig.tight_layout()
评论列表
文章目录