# graphviz2drawio | Harold Martin | Knowledge Base | Instagit

Convert graphviz (dot) files to draw.io / lucid (mxGraph) format. Beautiful and editable graphs in your favorite editor.

GitHub Stars: 265

Repository: https://github.com/hbmartin/graphviz2drawio

---

## Articles

### [How graphviz2drawio Differentiates Between `graph` and `digraph`](/hbmartin/graphviz2drawio/graphviz2drawio-graph-vs-digraph)

Learn how graphviz2drawio distinguishes between DOT graphs and digraphs using pygraphviz's AGraph directed attribute. Ensure correct arrowhead rendering in your conversions.

- Tags: internals
- Published: 2026-03-03

### [Coordinate Translation Logic in Graphviz2Drawio: Converting SVG Offsets to Absolute Positions](/hbmartin/graphviz2drawio/graphviz2drawio-coordinate-translation-logic)

Learn how graphviz2drawio translates SVG offsets to Draw.io absolute coordinates using the CoordsTranslate class for precise graph conversions.

- Tags: internals
- Published: 2026-03-03

### [How to Customize the Output Draw.io XML Format in graphviz2drawio](/hbmartin/graphviz2drawio/customize-drawio-xml-format-graphviz2drawio)

Customize Drawio XML output in graphviz2drawio by editing MxConst.py for tags, Styles.py for visuals, and MxGraph.py for custom attributes. Learn how to tailor your Graphviz exports.

- Tags: how-to-guide
- Published: 2026-03-03

### [How xlabel and label Are Handled Differently for Edges in graphviz2drawio](/hbmartin/graphviz2drawio/graphviz2drawio-xlabels-vs-labels)

**In graphviz2drawio, `xlabel` takes precedence over `label` when constructing lookup keys for edge attribute enrichment, while the visual text rendered on edges is extracted independently from SVG `<text>` elements.**

- Tags: deep-dive
- Published: 2026-03-03

### [How to Run Tests for the graphviz2drawio Project](/hbmartin/graphviz2drawio/run-tests-graphviz2drawio)

Quickly run tests for the graphviz2drawio project. Execute unit tests with pytest and specification tests with test_specs.sh after installing dependencies.

- Tags: how-to-guide
- Published: 2026-03-03

### [How to Integrate graphviz2drawio into Other Python Projects](/hbmartin/graphviz2drawio/integrate-graphviz2drawio-python-projects)

**You can integrate graphviz2drawio into Python projects by importing the `convert()` function from `graphviz2drawio.graphviz2drawio`, which accepts DOT files, strings, file objects, or `pygraphviz.AGraph` instances and returns...

- Tags: 
- Published: 2026-03-03

### [Understanding the Role of the mx Module in the graphviz2drawio Library](/hbmartin/graphviz2drawio/graphviz2drawio-mx-module-role)

Explore the mx module's role in graphviz2drawio. Learn how it serializes Graphviz DOT to drawio XML, translating styles, geometry, and curves for seamless diagram conversion.

- Tags: internals
- Published: 2026-03-03

### [Understanding the Models Directory in graphviz2drawio: SVG-to-Domain Object Conversion](/hbmartin/graphviz2drawio/graphviz2drawio-models-directory-purpose)

Explore the models directory in graphviz2drawio. Learn how it converts Graphviz SVG to Python objects for draw.io diagram creation and unlocks seamless SVG-to-domain object conversion.

- Tags: deep-dive
- Published: 2026-03-03

### [How Graphviz2Drawio Handles Edge Directions: Directed, Undirected, and Backward Edges](/hbmartin/graphviz2drawio/graphviz2drawio-edge-directions)

Explore how Graphviz2Drawio manages edge directions, including directed, undirected, and backward edges, to accurately represent your diagrams.

- Tags: how-to-guide
- Published: 2026-03-03

### [How graphviz2drawio Handles Special Graphviz Attributes During SVG-to-Draw.io Conversion](/hbmartin/graphviz2drawio/graphviz2drawio-special-attributes)

Discover how graphviz2drawio converts Graphviz SVG attributes like colors, opacity, and shapes into drawio styles for seamless diagram integration. Learn the transformation process.

- Tags: deep-dive
- Published: 2026-03-03

### [How Node Styles Are Converted from Graphviz to Draw.io: A Technical Deep Dive](/hbmartin/graphviz2drawio/graphviz2drawio-node-style-conversion)

Discover how Graphviz node styles are converted to Draw.io. Learn the technical process of mapping shapes, colors, and line styles from SVG to Draw.io XML using hbmartin/graphviz2drawio.

- Tags: deep-dive
- Published: 2026-03-03

### [How Edge Curves and Bézier Paths Are Generated for Draw.io Diagrams](/hbmartin/graphviz2drawio/graphviz2drawio-edge-curves-bezier-paths)

Learn how graphviz2drawio generates edge curves and bezier paths for Draw.io diagrams by parsing SVG segments and encoding them as mxGraph styles. Convert your Graphviz diagrams seamlessly.

- Tags: internals
- Published: 2026-03-03

### [How graphviz2drawio Parses GraphViz SVG Files: A Deep Dive into the SVG Parsing Process](/hbmartin/graphviz2drawio/graphviz2drawio-svg-parsing-explained)

Explore how graphviz2drawio parses GraphViz SVG files. Learn about its custom XML DOM parsing, gradient extraction, and factory delegation for nodes, edges, and clusters.

- Tags: deep-dive
- Published: 2026-03-03

### [How to Output Draw.io XML to stdout using graphviz2drawio](/hbmartin/graphviz2drawio/graphviz2drawio-output-stdout)

Easily output Draw.io XML to stdout using graphviz2drawio with the --stdout flag. Streamline your workflow and integrate with other tools seamlessly. Learn more today!

- Tags: how-to-guide
- Published: 2026-03-03

### [Error Handling Mechanisms in graphviz2drawio: Custom Exceptions and CLI Recovery](/hbmartin/graphviz2drawio/graphviz2drawio-error-handling)

Explore graphviz2drawio error handling: custom exceptions, validation, and CLI recovery for robust GraphViz to DrawIO conversions. Learn how it ensures smooth data transformation.

- Tags: deep-dive
- Published: 2026-03-03

### [How to Debug Graphviz-to-Draw.io Conversion Issues with graphviz2drawio](/hbmartin/graphviz2drawio/debug-graphviz2drawio-conversion)

Debug graphviz2drawio conversion issues by enabling DEBUG logging, catching specific errors like MissingTitleError, and inspecting SVG output to pinpoint failures in pygraphviz, SVG parsing, or XML generation.

- Tags: how-to-guide
- Published: 2026-03-03

### [How graphviz2drawio Handles Character Encoding for Input Files](/hbmartin/graphviz2drawio/graphviz2drawio-encoding-handling)

Discover how graphviz2drawio handles character encoding for input files. Learn about system locale detection, explicit CLI flags, and UTF-8 fallback for error-free conversion.

- Tags: how-to-guide
- Published: 2026-03-03

### [Which Graphviz Layout Programs Are Supported by graphviz2drawio?](/hbmartin/graphviz2drawio/graphviz2drawio-supported-layout-programs)

Discover which Graphviz layout programs graphviz2drawio supports. This tool leverages PyGraphviz to use any installed Graphviz engine, offering maximum flexibility for your diagrams.

- Tags: how-to-guide
- Published: 2026-03-03

### [How graphviz2drawio Converts Graphviz Clusters and Subgraphs to Draw.io](/hbmartin/graphviz2drawio/graphviz2drawio-clusters-subgraphs)

Learn how graphviz2drawio converts Graphviz clusters and subgraphs to Draw.io. Discover the method of rendering DOT to SVG, parsing groups, and preserving visual layering for seamless diagramming.

- Tags: how-to-guide
- Published: 2026-03-03

### [How GraphViz Edge Labels Are Converted to draw.io Output: The Complete Technical Pipeline](/hbmartin/graphviz2drawio/graphviz2drawio-edge-labels)

Discover how GraphViz edge labels convert to draw.io output. Learn how labels become separate mxCell objects with custom styling and relative geometry for HTML-formatted text on connectors.

- Tags: deep-dive
- Published: 2026-03-03

### [How to Customize the Graphviz to draw.io Conversion Process: A Complete Technical Guide](/hbmartin/graphviz2drawio/customize-graphviz-to-drawio-conversion)

Customize Graphviz to draw.io conversion by modifying dot files, extending Node and Edge factories, or subclassing MxGraph for custom XML attributes. Learn how to tailor your diagrams.

- Tags: how-to-guide
- Published: 2026-03-03

### [What Input Formats Does graphviz2drawio Accept? File, String, and AGraph Support Explained](/hbmartin/graphviz2drawio/graphviz2drawio-input-formats)

Learn what input formats graphviz2drawio accepts. Discover support for AGraph, file paths, strings, and more for seamless diagram generation from graphviz.

- Tags: api-reference
- Published: 2026-03-03

### [How to Use the graphviz2drawio Library Programmatically in Python](/hbmartin/graphviz2drawio/how-to-use-graphviz2drawio-programmatically-python)

Learn to programmatically convert Graphviz DOT to draw.io XML using the graphviz2drawio Python library. Discover the simple convert() function for effortless diagram integration.

- Tags: how-to-guide
- Published: 2026-03-03

