diff --git a/docs/ecosystem/tutorials.md b/docs/ecosystem/tutorials.md index 8a6a9e8e2..207ea79f6 100644 --- a/docs/ecosystem/tutorials.md +++ b/docs/ecosystem/tutorials.md @@ -87,3 +87,42 @@ graph LR; ![Example graph of the Python integration](img/python-mermaid-integration.png) + +## 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. + +```python +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. + +```python +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) diff --git a/packages/mermaid/src/docs/ecosystem/tutorials.md b/packages/mermaid/src/docs/ecosystem/tutorials.md index 9f0f351a2..d4b92fff5 100644 --- a/packages/mermaid/src/docs/ecosystem/tutorials.md +++ b/packages/mermaid/src/docs/ecosystem/tutorials.md @@ -81,3 +81,42 @@ graph LR; ![Example graph of the Python integration](img/python-mermaid-integration.png) + +## 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. + +```python +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. + +```python +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)