Graphviz#
Inheritance Diagram#
If you use sphinx.ext.inheritance_diagram to generate inheritance diagrams with
sphinx.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, inside conf.py, you need
the following option.
# conf.py
...
graphviz_output_format = 'svg'
...
Below is an example of the inheritance diagram for matplotlib.figure.Figure.
Try toggling light/dark mode to see it adapt!
See the sphinx inheritance-diagram documentation for more information.