@@ -15,49 +15,47 @@ canvas renderer. The goal is to duplicate and extend the interactive plotting c
1515although the scope is intentionally limited in the following ways:
1616
17171. This uses the object-oriented API of Matplotlib, not the stateful pyplot interface. This means there is
18- no `plt.imshow ` or `plt.plot ` – instead, you create a viewer object and call methods on it to add data
19- and customize the plot. This is a deliberate choice to avoid the pitfalls of the stateful API.
18+ no `` plt.imshow `` or `` plt.plot `` — instead, you create a figure object and call methods on axes to add
19+ data and customize the plot. This is a deliberate choice to avoid the pitfalls of the stateful API.
2020
21- python
22- ```
23- import anyplotlib as apl
24- import matplotlib.pyplot as plt
21+ .. code-block :: python
2522
26- # matplotlib:
27- fig, axs = plt.subplots(1,1)
28- axs.imshow(...)
23+ import anyplotlib as apl
24+ import matplotlib.pyplot as plt
2925
30- # anyplotlib equivalent:
31- fig, axs = apl.subplots(1,1)
32- axs.imshow(...)
33- ```
26+ # matplotlib:
27+ fig, axs = plt.subplots(1 , 1 )
28+ axs.imshow(... )
29+
30+ # anyplotlib equivalent:
31+ fig, axs = apl.subplots(1 , 1 )
32+ axs.imshow(... )
3433
3534 2. In matplotlib they use vector graphics (SVG) to render the plot, which is great for static images. It's especially
36- great for making publication-quality figures. (If you haven't try inkscape + matplotlib SVG output,
37- it's pretty amazing.) For interactivity, it can be slow. Anyplotlib uses a pure-JavaScript canvas renderer which is
38- much faster for interactive applications, but the quality of the output is not as good as vector graphics. This is a
39- trade-off that we are willing to make for the sake of interactivity.
35+ great for making publication-quality figures. (If you haven't tried inkscape + matplotlib SVG output,
36+ it's pretty amazing.) For interactivity, it can be slow. Anyplotlib uses a pure-JavaScript canvas renderer which is
37+ much faster for interactive applications, but the quality of the output is not as good as vector graphics. This is a
38+ trade-off that we are willing to make for the sake of interactivity.
4039
41403. Matplotlib supports a wide range of marker styles, line styles, and other plot elements. Anyplotlib focuses on a
42- core set of features that are most commonly used in scientific plotting. This means that some of the more
43- esoteric features of Matplotlib may not be available in Anyplotlib. In general we try to match the lower level
44- ` collections ` API of Matplotlib.
41+ core set of features that are most commonly used in scientific plotting. This means that some of the more
42+ esoteric features of Matplotlib may not be available in Anyplotlib. In general we try to match the lower level
43+ `` collections ` ` API of Matplotlib.
4544
46454. Each collection, plot, image is rendered as a single object on the canvas. This is highly performant and more
47- importantly allows for blitting. This is one of the main reasons why the `ipympl ` backend of Matplotlib is so slow.
46+ importantly allows for blitting. This is one of the main reasons why the `` ipympl ` ` backend of Matplotlib is so slow.
4847
49- 5. Finally `anyplotlib ` uses `AnyWidget ` as the underlying widget framework. This means that it can be used in any
50- environment that supports `AnyWidget `, including Jupyter notebooks, JupyterLab, and PyCharm notebook preview. Under
51- the hood, `AnyWidget ` uses a pure-JavaScript implementation of the widget protocol, which allows for fast rendering
52- and interactivity.
48+ 5. Finally `` anyplotlib `` uses `` AnyWidget ` ` as the underlying widget framework. This means that it can be used in any
49+ environment that supports `` AnyWidget ` `, including Jupyter notebooks, JupyterLab, and PyCharm notebook preview. Under
50+ the hood, `` AnyWidget ` ` uses a pure-JavaScript implementation of the widget protocol, which allows for fast rendering
51+ and interactivity.
5352
5453**Disclaimer **: This project is in the early stages of development. Additionally many of the
55- javascript code was optimized using LLM's . That being said, the javascript/python code is fairly minimal,
54+ JavaScript code was optimised using LLMs . That being said, the JavaScript/Python code is fairly minimal
5655and not too difficult to understand.
5756
58-
59- **Disclaimer #2 **: Mostly this project is to see __if__ something like this is possible, it remains to be
60- seen if this can be developed into a full-fledged plotting library. The hope is that this can be.
57+ **Disclaimer #2 **: Mostly this project is to see *if * something like this is possible; it remains to be
58+ seen if this can be developed into a full-fledged plotting library. The hope is that it can.
6159
6260* :ref: `genindex `
6361* :ref: `modindex `
0 commit comments