Skip to content

Commit

Permalink
Merge pull request #22273 from QuLogic/better-inheritance
Browse files Browse the repository at this point in the history
Improve inheritance diagrams
  • Loading branch information
jklymak committed Dec 15, 2022
2 parents deb03d8 + aa1ae8d commit 8e9f5ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions doc/_static/mpl.css
Expand Up @@ -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;
}
7 changes: 6 additions & 1 deletion doc/conf.py
Expand Up @@ -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
Expand Down

0 comments on commit 8e9f5ec

Please sign in to comment.