Graphviz#

Inheritance Diagram#

If you usesphinx.ext.inheritance_diagram to generate inheritance diagrams withsphinx.ext.graphviz, and you output the inheritance diagrams in SVG format,they will automatically adapt to this theme’s light or dark mode.

To have the inheritance-diagram render to SVG, insideconf.py, you needthe following option.

# conf.py...graphviz_output_format='svg'...

Below is an example of the inheritance diagram formatplotlib.figure.Figure.Try toggling light/dark mode to see it adapt!

Inheritance diagram of matplotlib.figure.Figure

See the sphinx inheritance-diagramdocumentation for more information.