pyphi.mcp.server.plot#
- pyphi.mcp.server.plot(target, kind='ces', view='lattice', max_relations=None)[source]#
Render one of PyPhi’s built-in visualizations.
Requires the
visualizeextra (pip install pyphi[visualize]). The interactive"ces"plot is returned as a path to a self-contained HTML file to open in a browser (it cannot be shown inline); the static figures are returned as an inline PNG.- Parameters:
target (str) – A
result_reffromanalyzefor"ces"and"repertoires", or a substrate handle for"connectivity"and"tpm".kind (str) –
"ces"— the cause-effect structure (Φ-structure), interactive."repertoires"— the cause and effect repertoires of the analysis."connectivity"— the substrate’s causal connectivity graph."tpm"— the state-by-state transition probability matrix.view (str) – For
kind="ces"only, which of the five views to draw:"lattice"(default, the inclusion Hasse diagram),"hypergraph"(the 3-D cause and effect purviews with relation faces),"scatter","matrix", or"spectrum". ("barycentric"is a layout, not a view.)max_relations (int, optional) – For
kind="ces"only, draw just the strongest this-many relations by φ_r. When the structure’s relations are computed analytically (relation_computation="ANALYTICAL"), whose relation set cannot be enumerated,Nonedraws the strongest 1000; node sizes and the spectrum view stay exact regardless. With enumerable ("CONCRETE") relations,Nonedraws every relation. For the full direct-Python surface seeget_iit_reference("visualization").
- Returns:
For
"ces", a message with the path to the interactive HTML file. Forthe static figures, a message with the PNG path plus an inline preview.
- Return type: