Home>Article> What is Graphviz

What is Graphviz

青灯夜游
青灯夜游 Original
2023-02-01 16:35:47 3253browse

Graphviz was born from AT&T's Bell Labs as an open source (EPL licensed), cross-platform scripted automated drawing software tool. Graphviz uses a DSL language called dot language to write a Script File script file, and then uses the Layout layout engine to parse this Script File script file to complete automated layout rendering.

What is Graphviz

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

What is Graphviz?

Graphviz (Graph Visualization)is an open source(EPL authorized ),Cross-platformscripted automated drawing software tool.GraphvizUse a

DSL (Domain Special Language)

language calleddotlanguage to writeScript File script file, and then useLayout layout engineto parse thisScript File script fileto completeautomated layout rendering.##AT&Tis one of the three major telecom operators in the United States. Now the telecom operator industry in the United States has been forcibly broken up since the original

AT&T
After the merger, a competitive situation was formed. The predecessor of

AT&TisBell Telephone Company,
Bell Telephone Companyis the company that invented the telephone.In the world of IT software,Bell Labscreated a series of great inventions such asUnixand
C language.GraphvizScript files generally have the file extension

.gv
or

.dot, becauseMicrosoft Office WordThe extension of the template file is also.dot. To avoid conflicts, it is generally recommended that the extension ofGraphvizscript files be saved as.gv.Note: In Graphviz, the worddot

has three main different uses:

Graphviz

's
    Script script
  • 's language name/grammar name

    #Graphviz

    's
  • One of the
  • LayoutThe name is also one ofCLICommand nameGraphviz

  • One of them
  • Script File (script file)Common extensionsWhy use Graphviz?

Automatic typesetting is more efficient:

    Graphviz
  • is mainly used to draw "relationship diagrams",

    GraphvizAutomatic typesetting is With "minimized line crossing",Graphviz's automatic layout is better than "What You See Is What You Get" drawing software (such as:Omnigraffle,Microsoft Office Visio, etc. )Text file management is more convenient:

  • VCS (Version Control System version control system)
  • "What you see is what you get" painting software The generated files cannot be effectively versioned, while the text files can be effectively versioned in

    VCSOther automated drawing tools The basis of:

  • Graphviz
  • is the basis of other automated drawing tools (such as

    PlantUML, etc.), and is also the basis of manyData Visualization data visualizationtools, somewhat similar The role ofMatplotlibinPythonThe basic structure and usage process of Graphviz

  • Graphviz## The basic structure of # includes two parts:
Layout automated layout tool

and

Script script file

.Script script filemainly includes two parts:Elements entityand

Attributes attribute

.Elements entitymainly includes three types:Graph,

Node node

, andEdge connection.Remarks: If you need to callGraphvizin the software,

Graphviz
also provides

C/CPP,##APIof #Java,Python,phpand other languages.The basic structure of Graphviz

Graphviz
It is also very simple and convenient to use. The general process is as follows:

What is Graphviz

General usage process of Graphviz

MacOS standalone client for Graphviz

A version of the MacOS X GUI developed by Glen Low prior toMacOS 10.6In 2004, he won two Apple Design Awards ("Best Product New to Mac OS X Runner-Up"and"Best OS X Open Source Product 2004 Winner"). ##MacOS Update: ThisGraphviz GUI versioncannot run in today's macOS based onIntel CPU. .MacOS 10.2 and 10.3 are based onPowerPC CPU, and 10.4 released in 2005 began to be based on bothIntel CPUandPowerPC CPU

, in 2009 10.6 released in 2017 no longer supports
PowerPC CPU

.Currently there is no independentGUI client that supportsMacOS X 10.6and later,

MacOS Can be used using
CLI

or in other embeddedGraphviztools (for example: usingmarkdown-preview-enhancedin theATOMeditorGraphviz Script Filecan be embedded in the plug-in).The script source code illustrated in this articleThe dot script source code of Grpahviz’s basic structure

digraph gv_basic_structure{ label=<Graphviz基本组成结构>; labelloc=t; bgcolor=transparent; node[shape=box]; //edge[style=bold]; graphviz[label="Graphviz"]; subgraph{ layout[label="Layouts"]; script[label="Script Files"]; api[label="APIs"] rank=same; } graphviz -> layout; graphviz -> script; graphviz -> api; script -> subgraph{ element[label="Elements"]; attribute[label="Attributes"]; rank=same; } layout -> subgraph{ layout_etc[label="......"]; layout_dot[label="dot"]; layout_neato[label="neato"]; } element -> subgraph{ ele_graph[label="Graph"]; ele_node[label="Node"]; ele_edge[label="Edge"]; } }

GraphvizPlantUML source code using general process
@startuml start :定义Graph属性; :定义Node、Edge默认属性; :添加Node和Edge; :定义特定Node、Edge的个性属性; :使用CLI或GUI布局引擎工具渲染绘制; end @enduml

For more programming-related knowledge, please visit:

Programming Teaching! !

The above is the detailed content of What is Graphviz. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What folder is desktop? Next article:What folder is desktop?