Skip to content

Commit

Permalink
feat(README): doc new tool matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
andros21 committed Nov 1, 2022
1 parent b7f6037 commit 931f035
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Imagine is a pandoc filter that will turn codeblocks tagged with certain
classes into images or ascii art. The following are currently supported:

actdiag, asy, asymptote, blockdiag, boxes, circo, ctioga2, ditaa, dot, fdp,
figlet, flydraw, gle, gnuplot, graph, graphviz, gri, imagine, mermaid, mscgen,
neato, nwdiag, octave, packetdiag, pic, pic2plot, plantuml, plot, ploticus,
protocol, pyxplot, rackdiag, seqdiag, sfdp, shebang, twopi
figlet, flydraw, gle, gnuplot, graph, graphviz, gri, imagine, matplotlib,
mermaid, mscgen, neato, nwdiag, octave, packetdiag, pic, pic2plot, plantuml,
plot, ploticus, protocol, pyxplot, rackdiag, seqdiag, sfdp, shebang, twopi

## Examples

Expand Down Expand Up @@ -103,6 +103,22 @@ classes into images or ascii art. The following are currently supported:
xy_chart.render_to_png(sys.argv[-1])
```

### [Matplotlib](https://matplotlib.org) using `python3-matplotlib`

![](https://raw.githubusercontent.com/andros21/imagine/master/pd-images/696609ec52b06244f4b2db3687d86c4a5ef47035.png)

```{.matplotlib im_fmt="png" im_out="img,fcb"}
x = np.linspace(-20, 20, 500)
V = np.sin(x)/x

fig, ax = plt.subplots()
ax.plot(x, V, 'r', label="$sinc(x)$")

ax.set_xlabel('$x$')
ax.set_ylabel('$y$')
ax.legend()
```

### [boxes](http://boxes.thomasjensen.com)

/* _\|/_
Expand Down Expand Up @@ -131,9 +147,9 @@ also includes formats other than `png`.

actdiag, asy, asymptote, blockdiag, boxes, circo, ctioga2, ditaa, dot,
fdp, figlet, flydraw, gle, gnuplot, graph, graphviz, gri, imagine,
mermaid, mscgen, neato, nwdiag, octave, packetdiag, pic, pic2plot,
plantuml, plot, ploticus, protocol, pyxplot, rackdiag, seqdiag, sfdp,
shebang, twopi
matplotlib, mermaid, mscgen, neato, nwdiag, octave, packetdiag, pic,
pic2plot, plantuml, plot, ploticus, protocol, pyxplot, rackdiag,
seqdiag, sfdp, shebang, twopi


Installation
Expand Down Expand Up @@ -545,4 +561,13 @@ SheBang
Wraps:
- 'shebang' -> shebang
Matplotlib
sudo apt-get install matplotlib
https://matplotlib.org
Runs python3 <fname>.matplotlib {im_opt} <fname>.{im_fmt}
Wraps:
- 'matplotlib' -> python3
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 931f035

Please sign in to comment.