1

I am using UMLGraph to generate sequence diagrams. I have a problem using the pic2plot program to generate svg images. It clips the image and parts of the image don't show. This problem is also documented in the FAQ:

How can I prevent clipped SVG images in sequence diagrams?

This appears to be a limitation of pic2plot. You can work around it, by increasing the width and height values appearing in the SVG XML file that pic2plot generates. 

However, I have tried but failed to change the width and height in the svg image. I tried modifying the width="8in" height="8in" viewBox="0 0 1 1" preserveAspectRatio="none" in the svg with no success.

Please help.

Sled
  • 18,541
  • 27
  • 119
  • 168
walters
  • 1,427
  • 3
  • 17
  • 28

2 Answers2

0

Editing the first line of the generated SVG seems to help...

Keeping the first parameter in the viewBox fixed, I scaled the width and the delta between third parameter and first parameter in the viewBox by 1.5 from

<svg baseProfile="full" height="19.67in" id="body" preserveAspectRatio="none" version="1.1" viewBox="-0.3800 -0.7325 0.6900 2.4588" width="5.52in" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink">

to

<svg baseProfile="full" height="19.67in" id="body" preserveAspectRatio="none" version="1.1" viewBox="-0.3800 -0.7325 1.035 2.4588" width="8.28in" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink">

No more clipping for me and looks okay. Your mileage may vary.

Mxyk
  • 10,678
  • 16
  • 57
  • 76
0

I don´t know about how to solve this specific problem with UMLGraph but if you are open to use other similar textual modeling tools, take a look here with more than 10 tools available

Jordi Cabot
  • 8,058
  • 2
  • 33
  • 39
  • 1
    I have been through that list. Thanks Jordi. I like UMLGraph better, but only have the clipping problem. – walters Mar 31 '11 at 04:21
  • MetaUML look nice but I am also failing to generate *.gif *.svg *.png from it. Any ideas? – walters Mar 31 '11 at 04:24
  • For future reference, http://stackoverflow.com/q/1743618/435253 would probably be a more appropriate listing of alternatives. (It has four different open-source, non-UMLGraph sequence diagram generators based on domain-specific languages. One of them, mscgen, even has a GPLv3 JavaScript port.) – ssokolow Feb 26 '15 at 14:40