Manually copy/pasting example code is a bit of a pain. One way to make sure example code always work would be to:
Write an integration test with the example code to be displayed
Make sure the tests pass
Use github actions to automatically fetch the validated source code, e.g. using Markdown autodoc: https://github.com/marketplace/actions/markdown-autodocs
It's a bit costly to get it working, but when it's down, it's really convenient and ensures that all code snippets are always valid :)
https://docs.enthought.com/mayavi/mayavi/auto/example_offscreen.html#example-offscreen https://docs.enthought.com/mayavi/mayavi/auto/example_glyph.html#example-glyph https://docs.enthought.com/mayavi/mayavi/auto/example_contour_contour.html#example-contour-contour https://docs.enthought.com/mayavi/mayavi/auto/example_scatter_plot.html#example-scatter-plot https://docs.enthought.com/mayavi/mayavi/auto/example_zzz_reader.html#example-zzz-reader https://docs.enthought.com/mayavi/mayavi/auto/example_structured_points2d.html#example-structured-points2d
And other.. This need verifications
BTW.. need some simple example of 2d line chart, candlestick, histogram.