Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000990graphvizDotpublic2005-10-26 15:282011-04-28 04:03
ReporterKarl Chen 
Assigned Toellson 
PlatformOS*-*-OS Version
Summary0000990: SVG size inconsistency

Wouldn't it make sense to have SVG be output the same size as
other output formats?

GraphViz only knows about inches, which doesn't make sense to me
for outputting raster formats. SVG output by GraphViz does have
pixel sizes specified and they seem to be at 74.0 pixels per inch.
I am using SVG with image maps by first outputting a PNG and
resizing the SVG to be the same size as the PNG; this works, but
is an ugly hack.

I wonder if GraphViz could just output SVG the same size it would
a raster image?

Additional Information

[erg] Like PostScript, SVG is a vector format allowing device-dependent units, so by default, this is
what Graphviz uses. Thus, the final image should be exactly the same size regardless of the device.
In this case, the width and height are expressed in points, using 72 points per inch.

If the graph specifies a dpi or resolution attribute, then the size is specified in pixels.

I would hope one of these two approaches would work for you without having to use the hack you
describe. If I'm still missing the problem, would you provide more detail about what it is you're
trying to do. Thanks.

Also, John Ellson may better understand the problem.

[ellson] I agree that dot's use of inches can be problematic, but changing it at this point
while maintaining backward compatibility is a bigger problem and not very high
in our priorities.

I'm not sure where the sizes are going wrong for you. Using the latest graphviz
snapshot on Linux, and using eog to view both .png and .svg from the same input .dot file,
the output images are the same size for me.
I don't understand why you are using imagemaps with svg images? The svg format
supports clickable anchors around svg objects so no separate map should be required.

graphviz-2.2.1 is a bit old. The latest stable release is graphviz-2.6, and nightly development snapshots
in the graphviz-2.7 series are available from [^]

TagsNo tags attached.
VERSION     2.2.1
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => user695

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker