diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 7cf24a748b0a..360aaac57604 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -99,3 +99,13 @@ table.property-table td { display: inline-block; margin: 0 0.5em; } + +/* Make inheritance images have a scroll bar if necessary. */ +div.graphviz { + border: 1px solid lightgrey; + max-height: 50em; + overflow: auto; +} +img.graphviz.inheritance { + max-width: none; +} diff --git a/doc/conf.py b/doc/conf.py index 80282c70a7bb..dd7ba1cebf9e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -619,7 +619,12 @@ def js_tag_with_cache_busting(js): numpydoc_show_class_members = False -inheritance_node_attrs = dict(fontsize=16) +# We want to prevent any size limit, as we'll add scroll bars with CSS. +inheritance_graph_attrs = dict(dpi=100, size='1000.0', splines='polyline') +# Also remove minimum node dimensions, and increase line size a bit. +inheritance_node_attrs = dict(height=0.02, margin=0.055, penwidth=1, + width=0.01) +inheritance_edge_attrs = dict(penwidth=1) graphviz_dot = shutil.which('dot') # Still use PNG until SVG linking is fixed