Home > Common Problem > body text

What is Graphviz

青灯夜游
Release: 2023-02-01 16:35:47
Original
3315 people have browsed it

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 called dot language to write Script File script file, and then use Layout layout engine to parse this Script File script file to complete automated layout rendering. ##AT&T is 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&T is Bell Telephone Company,
Bell Telephone Company is the company that invented the telephone. In the world of IT software, Bell Labs created a series of great inventions such as Unix and
C language. GraphvizScript files generally have the file extension

.gv
or

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

has three main different uses:

Graphviz

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

    #Graphviz

    's
  • One of the
  • LayoutThe name is also one of CLICommand 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 many Data Visualization data visualization tools, somewhat similar The role of Matplotlib in PythonThe 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 file mainly includes two parts: Elements entity and

Attributes attribute

. Elements entity mainly includes three types: Graph,

Node node

, and Edge connection. Remarks: If you need to call Graphviz in the software,

Graphviz
also provides

C/CPP, ##API of #Java, Python, php and 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<h2> <strong>MacOS standalone client for Graphviz</strong><br> </h2> <p>A version of the MacOS X GUI developed by <code>Glen Low prior to MacOS 10.6 In 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: This Graphviz GUI version cannot run in today's macOS based on Intel CPU. . MacOS 10.2 and 10.3 are based on PowerPC CPU, and 10.4 released in 2005 began to be based on both Intel CPU and PowerPC CPU

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

. Currently there is no independent GUI client that supports MacOS X 10.6 and later ,

MacOS Can be used using
CLI

or in other embedded Graphviz tools (for example: using markdown-preview-enhanced in the ATOM editor Graphviz Script File can 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=<<B>Graphviz基本组成结构</B>>;
    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"];
    }
}
Copy after login

GraphvizPlantUML source code using general process
@startuml
start
:定义Graph属性;
:定义Node、Edge默认属性;
:添加Node和Edge;
:定义特定Node、Edge的个性属性;
:使用CLI或GUI布局引擎工具渲染绘制;
end
@enduml
Copy after login
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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!