|
111 | 111 | # Artists are drawn to the **canvas**. Most Artists are tied to an Axes; such
|
112 | 112 | # an Artist cannot be shared by multiple Axes, or moved from one to another.
|
113 | 113 | #
|
| 114 | +# .. _plot_types_quickstart: |
| 115 | +# |
| 116 | +# Plot types |
| 117 | +# ========== |
| 118 | +# |
| 119 | +# For an overview of the different types of plot you can create with Matplotlib, |
| 120 | +# see the :ref:`Plot types gallery <plot_types>`. If you don't find the plot |
| 121 | +# type you need, it may still be possible to create the visualization you want |
| 122 | +# by combining existing Artists and plot elements. |
| 123 | +# |
| 124 | +# * To manipulate and customize points, see :class:`~.markers.MarkerStyle` |
| 125 | +# * To manipulate and customize lines, see :class:`~.lines.Line2D` or |
| 126 | +# :class:`~.collections.LineCollection` |
| 127 | +# * To manipulate and customize regions, see :mod:`matplotlib.patches` |
| 128 | +# * To manipulate and customize :mod:`images <matplotlib.image>`, see |
| 129 | +# :class:`~.image.AxesImage` |
| 130 | +# * To manipulate and customize contours and (vector) fields, see |
| 131 | +# `~.axes.Axes.contour` and `~.axes.Axes.quiver`, respectively. |
| 132 | +# * For anything else, see :ref:`artists_tutorial`. |
| 133 | +# |
114 | 134 | # .. _input_types:
|
115 | 135 | #
|
116 | 136 | # Types of inputs to plotting functions
|
@@ -559,27 +579,6 @@ def my_plotter(ax, data1, data2, param_dict):
|
559 | 579 | # and formatters appropriate to the norm. These can be changed as for
|
560 | 580 | # other Axis objects.
|
561 | 581 |
|
562 |
| -# %% |
563 |
| -# Patches |
564 |
| -# ======= |
565 |
| -# |
566 |
| -# :mod:`Patches <matplotlib.patches>` are a family of Artists that can be used |
567 |
| -# when drawing arbitrary two-dimensional regions. In addition to the general |
568 |
| -# Patch Artists :class:`~.patches.PathPatch` and :class:`~.patches.Polygon`, |
569 |
| -# common shapes have corresponding Patch Artists such as |
570 |
| -# :class:`~.patches.Circle`, :class:`~.patches.Rectangle`, |
571 |
| -# :class:`~.patches.Ellipse`, etc. |
572 |
| - |
573 |
| -fig, ax = plt.subplots() |
574 |
| - |
575 |
| -polygon = mpl.patches.Polygon(np.array([[1, 0], [0.5, 1.5], [2, 1]]), closed=True) |
576 |
| -ax.add_patch(polygon) |
577 |
| - |
578 |
| -circle = mpl.patches.Circle((2, 2), 0.5, facecolor='orange', edgecolor='black') |
579 |
| -ax.add_patch(circle) |
580 |
| - |
581 |
| -ax.set(xlim=(0, 3), ylim=(0, 3), box_aspect=1) |
582 |
| - |
583 | 582 | # %%
|
584 | 583 | # Working with multiple Figures and Axes
|
585 | 584 | # ======================================
|
|
0 commit comments