How can I make Sifinx inheritance_diagram readable?

Like this header , I see Sphinx generating graphviz unreadable output:

tiny_graph.jpg

How can I create readable output?

  • Nothing happens if I add -Gfontsize=140
  • If I tell him to use neato instead of dot , it will neato readable output, but the graphs are not like a tree.
+6
python graphviz python-sphinx
source share
1 answer

I figured out the answer to this thread . In the graphviz.py code graphviz.py they have a default value for the graph size of 8.0x12.0. If you want Graphviz to determine the size you need to put in conf.py so that the Sphinx graphviz extension uses your empty string instead of the default one:

 inheritance_graph_attrs = dict(size='""') 

Also, if you run into this problem, then the graph may be too wide if you allow the size to define Graphviz. You will also need the attribute rankdir="TB" to move the tree from top to bottom, and not from left to right:

 inheritance_graph_attrs = dict(rankdir="TB", size='""') 
+7
source share

All Articles