@@ -50,6 +50,28 @@ to explicitly render an already-built canvas, use `canvas.render(...)`.
5050The older ` canvas.plot(backend=...) ` spelling is still supported for
5151compatibility, but emits a ` FutureWarning ` .
5252
53+ Add several lines at once with shared styling:
54+
55+ ``` python
56+ canvas.plot_many(
57+ [(x, np.sin(x)), (x, np.cos(x))],
58+ labels = [" sin(x)" , " cos(x)" ],
59+ linewidth = 2 ,
60+ )
61+ ```
62+
63+ Common figure and axis settings can be grouped with ` configure() ` :
64+
65+ ``` python
66+ canvas.configure(
67+ title = " Trigonometry" ,
68+ xlabel = " Angle" ,
69+ ylabel = " Value" ,
70+ grid = True ,
71+ facecolor = " whitesmoke" ,
72+ )
73+ ```
74+
5375For Matplotlib-specific customization, pass method calls declaratively.
5476Figure methods run once and axes methods run for every subplot,
5577providing access to any Matplotlib API without requiring a maxplotlib
@@ -165,26 +187,27 @@ terminal_fig = canvas.render(backend="plotext")
165187print (terminal_fig.build(keep_colors = False ))
166188```
167189
190+ Trigonometry
168191 Runtime
169- ┌───────────────────────────────────────────────────────────────────────── ┐
170- 1.00┤ ▗▄▞▀▀▀▀▀▙▄▖ │
171- │ ▗ ▄▀▘ ▝▀▄ │
172- │ ▗▞ ▘ ▀▄ │
173- 0.67┤ ▟▀ ▀▄ │
174- │ ▄▛ ▚▖ │
175- 0.33┤ ▗▞ ▝▄ │
176- │ ▄▀ ▚▖ │
177- │▗▞▘ ▀▄ │
178- 0.00┤▀ ▝▚▖ ▞│
179- │ ▀▄ ▗▞▘│
180- │ ▝▚ ▄▀ │
181- -0.33┤ ▀▖ ▞▘ │
182- │ ▝▚ ▟▀ │
183- -0.67┤ ▀▄ ▄▛ │
184- │ ▀▄ ▗▞▘ │
185- │ ▀▄▖ ▗▄▀▘ │
186- -1.00┤ ▝▀ ▜▄▄▄▄▄▞▀▘ │
187- └┬ ─────────────────┬ ─────────────────┬ ─────────────────┬ ─────────────────┬ ┘
192+ ┌┬ ─────────────────┬ ─────────────────┬ ─────────────────┬ ─────────────────┬ ┐
193+ 1.00┼ ▞▞ sin(x) ── ▗▄▞▀▀▀▀▀▙▄▖────────────┼─────────────────┼─────────────▄▄▀▀▀┤
194+ │ ▞▞ cos(x) ▄▀▘ │ ▝▀▄ │ │ ▄▞▀ │ │
195+ ││ ▜▄ ▘ │ ▀▄ │ │ ▄▛ │ │
196+ 0.67┼┼──────▟▀─▀▄──────┼─────────▀▄──────┼─────────────────┼──────▄▀─────────┼┤
197+ ││ ▄▛ ▝▚▖ │ ▚▖ │ │ ▗▞▘ │ │
198+ 0.33┼┼──▗▞────────▀▖───┼────────────▝▄───┼─────────────────┼───▗▀────────────┼┤
199+ ││ ▄▀ ▝▚ │ ▚▖ │ │ ▞▘ │ │
200+ │▗▞▘ ▀▖│ ▀▄│ │▗▀ │ │
201+ 0.00┼▞────────────────▝▙────────────────▝▚▖────────────────▟▘────────────────▄┤
202+ ││ │▜▖ │ ▀▄ ▗▛│ ▗▞▘│
203+ ││ │ ▝▙ │ ▝▚ ▟▘ │ ▄▀ │ │
204+ -0.33┼┼─────────────────┼───▚▖────────────┼───▀▖───────▗▞───┼─────────────▞▘──┼┤
205+ ││ │ ▝▄▖ │ ▝▚ ▗▄▘ │ ▟▀ │ │
206+ -0.67┼┼─────────────────┼──────▀▖─────────┼──────▀▄─▗▀──────┼─────────▄▛──────┼┤
207+ ││ │ ▝▜▄ │ ▄▛▘ │ ▗▞▘ │ │
208+ ││ │ ▀▄▖ │ ▗▄▀ ▀▄▖ │ ▗▄▀▘ │ │
209+ -1.00┼┼─────────────────┼────────────▝▀▚▄▄▄▄▄▞▀▘───────▝▀ ▜▄▄▄▄▄▞▀▘────────────┼┤
210+ └┼ ─────────────────┼ ─────────────────┼ ─────────────────┼ ─────────────────┼ ┘
188211 0.0 1.6 3.1 4.7 6.3
189212 Duration Time
190213
@@ -194,7 +217,7 @@ Or plot with the TikZ backend:
194217canvas.show(backend = " tikzfigure" )
195218```
196219
197- ![ ] ( README_files/figure-commonmark/cell-12 -output-1.png )
220+ ![ ] ( README_files/figure-commonmark/cell-14 -output-1.png )
198221
199222### Horizontal Subplots with TikZ Backend
200223
@@ -275,7 +298,7 @@ canvas.show(backend="plotext")
275298 1.0 1.8 3.2 5.6 10.0
276299 y x
277300
278- <maxplotlib.backends.plotext.figure.PlotextFigure at 0x10ee1ce10 >
301+ <maxplotlib.backends.plotext.figure.PlotextFigure at 0x1102a0690 >
279302
280303### Layers
281304
@@ -311,7 +334,7 @@ Show layer 0 only, then layers 0 and 1, then everything:
311334canvas.show(layers = [0 ])
312335```
313336
314- ![ ] ( README_files/figure-commonmark/cell-16 -output-1.png )
337+ ![ ] ( README_files/figure-commonmark/cell-18 -output-1.png )
315338
316339 (<Figure size 590.551x324.803 with 1 Axes>,
317340 array([[<Axes: xlabel='x'>]], dtype=object))
@@ -322,7 +345,7 @@ Show all layers:
322345canvas.show()
323346```
324347
325- ![ ] ( README_files/figure-commonmark/cell-17 -output-1.png )
348+ ![ ] ( README_files/figure-commonmark/cell-19 -output-1.png )
326349
327350 (<Figure size 590.551x324.803 with 1 Axes>,
328351 array([[<Axes: xlabel='x'>]], dtype=object))
0 commit comments