2

I have a GraphViz diagram embedded in Sphinx, such as

.. graphviz::
   :caption: My diagram

   digraph {
        a -> b -> c -> d
   }

How do I scale it for display in the HTML generated by Sphinx? It doesn't accept a :scale: directive after the :caption:, so I would need to do something inside the Graphviz. However, Graphviz guides usually leave scaling to command line arguments for "dot".

mzjn
  • 48,958
  • 13
  • 128
  • 248
Lars Ericson
  • 1,952
  • 4
  • 32
  • 45

1 Answers1

1

Never mind I just figured it out. There is a size="x,y" directive where size is in printed inches, so:

.. graphviz::
   :caption: My diagram

   digraph {
        size="4,4";
        a -> b -> c -> d
   }
Lars Ericson
  • 1,952
  • 4
  • 32
  • 45