feat: add doc to use marmaid.js in GNU Octave

feat: add doc to use marmaid.js in GNU Octave. Resolve #7073
This commit is contained in:
CNOCTAVE
2025-11-04 20:34:13 +08:00
parent 57530076aa
commit 38c289818c
2 changed files with 0 additions and 78 deletions

View File

@@ -87,42 +87,3 @@ graph LR;
![Example graph of the Python integration](img/python-mermaid-integration.png)
<!--- cspell:ignore Elle Jaoude Neurodiverse graphbytes imshow savefig --->
## GNU Octave Integration with mermaid-js
Here's an example of GNU Octave integration with mermaid-js which uses the
octave_mermaid_js package to save graph image.
```matlab
pkg load octave_mermaid_js
graph = {
"graph LR;"
" A--> B & C & D"
" B--> A & E"
" C--> A & E"
" D--> A & E"
" E--> B & C & D"
}
graph = strjoin(graph, "\n")
[ret, status] = mermaid_js_save(graph, "result.png")
```
Here's an example of GNU Octave integration with mermaid-js which uses the
octave_mermaid_js package to show graph image.
```matlab
pkg load octave_mermaid_js
graph = {
"graph LR;"
" A--> B & C & D"
" B--> A & E"
" C--> A & E"
" D--> A & E"
" E--> B & C & D"
}
graph = strjoin(graph, "\n")
[ret, status] = mermaid_js_imshow(graph)
```
Here's a journal article about octave_mermaid_js.
[octave_mermaid_js: Integrating Mermaid.js Diagram Generation into GNU Octave](https://engrxiv.org/preprint/view/5547)