Code interpreter runs can return rich notebook results, including images and JavaScript-backed outputs when the selected kernel emits them. The standard Python template configures inline Matplotlib output and includes common plotting libraries.
plot = machine.run_code("""
import matplotlib.pyplot as plt

plt.plot([1, 2, 3], [1, 4, 9])
plt.show()
""")

has_png = any(result.png or (result.data and "image/png" in result.data)
              for result in plot.results)
print(has_png)
Rich result objects (result.png, result.data) are SDK-only. Via the CLI or HTTP API, save the figure to a file and fetch it with code artifact download or a filesystem read. For files written during execution, use artifacts or the machine filesystem to download the generated output.