Title: WP-GraphViz
Author: DeBAAT
Published: <strong>2013 年 8 月 29 日</strong>
Last modified: 2023 年 7 月 23 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/wp-graphviz/assets/icon-256x256.png?rev=971604)

# WP-GraphViz

 由 [DeBAAT](https://profiles.wordpress.org/debaat/) 開發

[下載](https://downloads.wordpress.org/plugin/wp-graphviz.1.5.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/wp-graphviz/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/wp-graphviz/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/wp-graphviz/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/wp-graphviz/#developers)

 [技術支援](https://wordpress.org/support/plugin/wp-graphviz/)

## 外掛說明

[GraphViz](http://www.graphviz.org/) is a powerful tool for visualising network 
and tree structures that connect objects.

This WordPress plugin provides a shortcode mechanism to create GraphViz graphics
within blogs, using the shortcode mechanism.

It’s working is based on the viz.js code as provided by Mike Daines:

    ```
    https://github.com/mdaines/viz.js
    ```

Special thanks goes to chrisy as author of TFO Graphviz, e.g. for providing the 
inspiration for this readme:

    ```
    https://wordpress.org/plugins/tfo-graphviz/
    ```

### How to use WP GraphViz

The shortcode syntax is:

    ```
    [wp_graphviz <options>]
     <DOT code>
    [/wp_graphviz]
    ```

Where `<options>` is anything from this list. All are entirely optional:

 * `id="`_<id>_`"`
 * Provides the identifier used to link the generated image to an image map. If 
   you use the `simple` option then it also provides the name of the generated DOT
   graph container (since GraphViz uses this to generate the image map). If not 
   given then an identifier is generated with the form `wp_graphviz_N` where _N_
   is an integer that starts at one when the plugin is loaded and is incremented
   with use.
 * `output="<png|gif|jpg|svg>"`
 * Indicates the desired image format. Defaults to `png`.
 * `simple="yes|no"`
 * The `simple` option provides a very basic DOT wrapper around your code such that
   the following is possible:
 *     ```
       [wp_graphviz simple="yes"] a -> b -> c; [/wp_graphviz]
       ```
   
 * The generated code would look like:
 *     ```
       digraph wp_graphviz_1 {
           a -> b -> c;
       }
       ```
   
 * See the `id` option for a description of where the name of the `digraph` comes
   from. `simple` defaults to `no`.
 * `title="`_<title>_`"`
 * Indicates the title of the image. This is used in the `alt` and `title` attributes
   of the image reference. This defaults to an empty string. Note that image maps
   may indicate a `title` string which will appear in tool-tips.

## 螢幕擷圖

[⌊This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note
that the screenshot is taken from the /assets directory or the directory that contains
the stable readme.txt (tags or trunk). Screenshots in the /assets directory take
precedence. For example, /assets/screenshot-1.png would win over /tags/4.3/screenshot-
1.png (or jpg, jpeg, gif).⌉⌊This screen shot description corresponds to screenshot-
1.(png|jpg|jpeg|gif). Note that the screenshot is taken from the /assets directory
or the directory that contains the stable readme.txt (tags or trunk). Screenshots
in the /assets directory take precedence. For example, /assets/screenshot-1.png 
would win over /tags/4.3/screenshot-1.png (or jpg, jpeg, gif).⌉[

This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note
that the screenshot is taken from the /assets directory or the directory that contains
the stable readme.txt (tags or trunk). Screenshots in the /assets directory take
precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-
1.png` (or jpg, jpeg, gif).

## 安裝方式

 1. Upload `wp-graphviz.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Use shortcode `[wp_graphviz]<dot code>[/wp_graphviz]` in your posts or pages

## 常見問題集

### What is GraphViz?

[GraphViz](http://www.graphviz.org/) is a way of generating visualisations of structural
relationships between objects.
 Almost any kind of diagram where something _connects_
to something else can be drawn and automatically laid out using the DOT language.

### How do I use this plugin?

Use the `[wp_graphviz]` shortcode. Various uses are explained in the “_How to use_”
section.

### How do I write DOT?

The online documentation for [GraphViz](http://www.graphviz.org/) is terse and not
especially helpful, in particular the [DOT language](http://www.graphviz.org/doc/info/lang.html)
page is only helpful if you happen to be able to read an approximation of [BNF](http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form).

There are however several other introductions to Graphviz and DOT, including [an excerpt on the O’Reilly LinuxDevCenter.com site](http://linuxdevcenter.com/pub/a/linux/2004/05/06/graphviz_dot.html).

Another approach would be to look at the examples in the [Graphviz gallery](http://www.graphviz.org/Gallery.php).

If in doubt, find an example and experiment with it.

## 使用者評論

![](https://secure.gravatar.com/avatar/af6094cf7033bf3e194eaa9432f9904a050cc49eb4a9ebd7dcf00abdf334d3d0?
s=60&d=retro&r=g)

### 󠀁[Good with WP 6.4.2.](https://wordpress.org/support/topic/good-with-wp-6-4-2/)󠁿

 [lilisanfilippo](https://profiles.wordpress.org/lilisanfilippo/) 2024 年 3 月 17
日

It works perfectly fine. Though you have to use -> and cannot use – – but whatever.

![](https://secure.gravatar.com/avatar/f613723a205595cb49e694509dc0da34a58edcf45a38e7234dc53f52dfc608ee?
s=60&d=retro&r=g)

### 󠀁[The only working GV plugin](https://wordpress.org/support/topic/the-only-working-gv-plugin/)󠁿

 [bolet75](https://profiles.wordpress.org/bolet75/) 2018 年 2 月 10 日

I tried the 2 other available GV plugins. Only this one: – generates svg (plus png
of course) which is a must for me, – accepts complete existing dot files (I have
a lot of those, and I’d rather not spend time “simplifying” them), – doesn’t put
its (c) mark at the bottom of every graph (one of the others did, quite an intrusive
self promotion), – is self contained (one other relies on a binary GV installation,
but can’t find the executable because php runs chrooted here). THANKS to the author!

 [ 閱讀全部 3 則使用者評論 ](https://wordpress.org/support/plugin/wp-graphviz/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈WP-GraphViz〉的開發相關工作。

參與者

 *   [ DeBAAT ](https://profiles.wordpress.org/debaat/)

〈WP-GraphViz〉外掛目前已有 1 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/wp-graphviz/contributors)
為這個外掛做出的貢獻。

[將〈WP-GraphViz〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/wp-graphviz)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/wp-graphviz/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/wp-graphviz/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/wp-graphviz/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/wp-graphviz/)。

## 變更記錄

#### 1.5.1

 * Tested for WordPress 6.2.2.

#### 1.5.0

 * Tested for WordPress 5.4.

#### 1.4.0

 * Tested for WordPress 5.0.

#### 1.3.0

 * Replaced viz.js with viz-lite.js to reduce footprint only supporting dot and 
   svg options.
 * Fixed shortcode handling keeping only those that work with viz-lite.
 * Disabled wptexturize for WP_GraphViz shortcode.
 * Formal version, tested for WP 4.7.4.
 * Fixed translations.

#### 1.2.1

 * Fixed translation handling using localization functions.

#### 1.2.0

 * Formal version, tested for WP 4.6.1.
 * Added shortcode parameters.

#### 1.1.0

 * Formal version, tested for WP 4.0.
 * Added icon-128×128.png to support plugin icons.

#### 1.0.0

 * First formal version, improved reference data.
 * Updated the viz.js library to latest version.

#### 0.1.0

 * First version starting the plugin.

## 中繼資料

 *  版本 **1.5.1**
 *  最後更新 **3 年前**
 *  啟用安裝數 **50+**
 *  WordPress 版本需求 ** 5.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.2.9**
 *  語言
 * [Dutch](https://nl.wordpress.org/plugins/wp-graphviz/) 及 [English (US)](https://wordpress.org/plugins/wp-graphviz/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/wp-graphviz)
 * 標籤:
 * [diagram](https://tw.wordpress.org/plugins/tags/diagram/)[dot](https://tw.wordpress.org/plugins/tags/dot/)
   [graph](https://tw.wordpress.org/plugins/tags/graph/)[graphviz](https://tw.wordpress.org/plugins/tags/graphviz/)
   [network](https://tw.wordpress.org/plugins/tags/network/)
 *  [進階檢視](https://tw.wordpress.org/plugins/wp-graphviz/advanced/)

## 評分

 4 星，滿分為 5 星

 *  [  2 個 5 星使用者評論     ](https://wordpress.org/support/plugin/wp-graphviz/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/wp-graphviz/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/wp-graphviz/reviews/?filter=3)
 *  [  1 個 2 星使用者評論     ](https://wordpress.org/support/plugin/wp-graphviz/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/wp-graphviz/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-graphviz/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/wp-graphviz/reviews/)

## 參與者

 *   [ DeBAAT ](https://profiles.wordpress.org/debaat/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/wp-graphviz/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://www.de-baat.nl/WP_Graphviz)