> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ns.rocks/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Produce static and interactive visual outputs from code interpreter runs.

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.

```python theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
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.

## Related

* [Static charts](./static-charts)
* [Interactive charts](./interactive-charts)
* [Runs and artifacts](./runs-artifacts)
