Menu

#252 ugly pydot generated UML diagrams

open
5
2008-02-11
2008-02-11
No

Please see the attached file: The text sticks out of the UML boxes. As the rest of my pydot generated stuff looks nice I suppose it is something with epydoc styles.

Discussion

  • Willi Richert

    Willi Richert - 2008-02-11

    pydot generated UML diagram with bad font size

     
  • Edward Loper

    Edward Loper - 2008-02-11

    Logged In: YES
    user_id=195958
    Originator: NO

    what version of graphviz are you using? Note that epydoc uses the graphviz html-like codes to construct those graphs; and those codes may not be fully supported in older versions of graphviz.

     
  • Edward Loper

    Edward Loper - 2008-02-11
    • labels: --> html generation
    • assigned_to: nobody --> edloper
     
  • Willi Richert

    Willi Richert - 2008-02-12

    Logged In: YES
    user_id=1187949
    Originator: YES

    graphviz 2.12-4ubuntu3
    libgraphviz3 2.12-4ubuntu3
    python-pydot 0.9.10-1

     
  • Edward Loper

    Edward Loper - 2008-02-12

    Logged In: YES
    user_id=195958
    Originator: NO

    Hm, that's fairly up-to-date. You can look at the digraph file that epydoc generates, and see if anything looks wrong. To do that, you'll need to add some code to epydoc/docwriter/dotrgraph.html. The easiest thing is probably to modify the write() method (on around line 230) by adding the following three lines to the top of the method:

    out = open(filename+'.dot', 'w')
    out.write(self.to_dotfile()
    out.close()

    Then run epydoc, and check for "*.dot" files in the output directory.

    In the meantime, I'll look through the graphviz bug list [1] to see if anything looks relevant. (Note that pydot shouldn't be involved, since epydoc calls the graphviz 'dot' executable directly.)

    [1] http://www.graphviz.org/bugs/openbugs.html

     
  • Edward Loper

    Edward Loper - 2008-02-12

    Logged In: YES
    user_id=195958
    Originator: NO

    I notice that the font on your example .gif looks different from the fonts on the graphs that I generate. E.g., compare to [1]. So perhaps there's some font problem at work here? By default, epydoc uses 10 point Helvetica; but you could try specifying a different font or size with the --graph-font and --graph-size options to epydoc, and see if that fixes the problem.

    [1] http://epydoc.sourceforge.net/api/epydoc.apidoc.APIDoc-class.html

     
  • Willi Richert

    Willi Richert - 2008-02-12

    image from epydoc.docwriter.dotgraph-module.html generated on my machine

     
  • Willi Richert

    Willi Richert - 2008-02-12

    Logged In: YES
    user_id=1187949
    Originator: YES

    File Added: import_graph.gif

     
  • Edward Loper

    Edward Loper - 2008-02-25

    Logged In: YES
    user_id=195958
    Originator: NO

    Have you had a chance to test whether using a different font (via --graph-font and --graph-font-size options) fixes the problem?

     
  • Gabriel Rossetti

    Logged In: YES
    user_id=1987766
    Originator: NO

    I have exactly the same thing using the same versions. I had updated epydoc thinking maybe the beta version (version in ubuntu 7.10) did that, but the current has the same output. Using the following options :

    --graph-font-size 10 --graph-font courier

    worked for me, but the not the following fonts: helvetica, times.

    Gabriel

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.