dot可以生成很多种格式的文件,最常用的是png,但是还是有很多的格式可以生成。
官方网站中给出:http://www.graphviz.org/content/output-formats
bmp | Windows Bitmap Format |
canon dot gv xdot xdot1.2 xdot1.4 | DOT |
cgimage | CGImage bitmap format |
cmap | Client-side imagemap (deprecated) |
eps | Encapsulated PostScript |
exr | OpenEXR |
fig | FIG |
gd gd2 | GD/GD2 formats |
gif | GIF |
gtk | GTK canvas |
ico | Icon Image File Format |
imap cmapx | Server-side and client-side imagemaps |
imap_np cmapx_np | Server-side and client-side imagemaps |
ismap | Server-side imagemap (deprecated) |
jp2 | JPEG 2000 |
jpg jpeg jpe | JPEG |
json json0 dot_json xdot_json | Dot graph represented in JSON format |
pct pict | PICT |
Portable Document Format (PDF) | |
pic | Kernighan's PIC graphics language |
plain plain-ext | Simple text format |
png | Portable Network Graphics format |
pov | POV-Ray markup language (prototype) |
ps | PostScript |
ps2 | PostScript for PDF |
psd | PSD |
sgi | SGI |
svg svgz | Scalable Vector Graphics |
tga | Truevision TGA |
tif tiff | TIFF (Tag Image File Format) |
tk | TK graphics |
vml vmlz | Vector Markup Language (VML) |
vrml | VRML |
wbmp | Wireless BitMap format |
webp | Image format for the Web |
xlib x11 | Xlib canvas |
具体实现命令为:(已验证)
png: dot graph1.gv -Tpng -o test.png
pdf: dot graph1.gv -Tpdf -o test.pdf
其他格式尚未验证,猜测为
xxx: dotgraph1.gv -Txxx -o test.xxx