OpenSite/Guides/Publish a plot
Draw a small arithmetic curve and publish it to an OpenSite plot tab.
- Stable identifier
opensite.help.publish-a-plot
Prerequisites
Desktop GUI and Python, with Matplotlib in the matching scientific runtime. This example is not a structural-analysis result.
Steps
Create a figure
Use plt.subplots(), then label both axes and state units. The lesson plots length squared, not a solver response.
Publish the selected figure
Call opensite.plot.show(figure). Calling show() without an argument publishes open figures.
Read the plot tab
Plot views share the central workspace with scripts and document views. Switching workbench does not mean those tabs must close.
Navigate or export
Zoom/pan navigate the published raster. Use the viewer’s Save/Copy actions when present; do not assume zoom recalculates Matplotlib axes or underlying engineering data.
Expected result
Four labelled points appear, with illustrative values 1, 4, 9 and 16 m².
Limitations
The current viewer publishes Agg-rendered images. Matplotlib must be present in the matching runtime; installing it into an unrelated system Python does not update OpenSite.
Complete example
import opensite
import matplotlib.pyplot as plt
lengths = [1.0, 2.0, 3.0, 4.0]
illustrative_values = [length * length for length in lengths]
figure, axes = plt.subplots()
axes.plot(lengths, illustrative_values, marker="o")
axes.set(xlabel="Input length (m)", ylabel="Illustrative value (m²)",
title="Reading a published plot")
axes.grid(True)
opensite.plot.show(figure)
# This arithmetic demonstration is not a structural analysis result.