:orphan: .. _plot_types: .. redirect-from:: /tutorials/basic/sample_plots Plot types ========== Overview of many common plotting commands in Matplotlib. Note that we have stripped all labels, but they are present by default. See the `gallery <../gallery/index.html>`_ for many more examples and the `tutorials page <../tutorials/index.html>`_ for longer examples. .. raw:: html
.. raw:: html
Basic ----- Basic plot types, usually y versus x. .. raw:: html
.. raw:: html
.. only:: html .. image:: /plot_types/basic/images/thumb/sphx_glr_plot_thumb.png :alt: plot(x, y) :ref:`sphx_glr_plot_types_basic_plot.py` .. raw:: html
plot(x, y)
.. raw:: html
.. only:: html .. image:: /plot_types/basic/images/thumb/sphx_glr_scatter_plot_thumb.png :alt: scatter(x, y) :ref:`sphx_glr_plot_types_basic_scatter_plot.py` .. raw:: html
scatter(x, y)
.. raw:: html
.. only:: html .. image:: /plot_types/basic/images/thumb/sphx_glr_bar_thumb.png :alt: bar(x, height) :ref:`sphx_glr_plot_types_basic_bar.py` .. raw:: html
bar(x, height)
.. raw:: html
.. only:: html .. image:: /plot_types/basic/images/thumb/sphx_glr_stem_thumb.png :alt: stem(x, y) :ref:`sphx_glr_plot_types_basic_stem.py` .. raw:: html
stem(x, y)
.. raw:: html
.. only:: html .. image:: /plot_types/basic/images/thumb/sphx_glr_step_thumb.png :alt: step(x, y) :ref:`sphx_glr_plot_types_basic_step.py` .. raw:: html
step(x, y)
.. raw:: html
.. only:: html .. image:: /plot_types/basic/images/thumb/sphx_glr_fill_between_thumb.png :alt: fill_between(x, y1, y2) :ref:`sphx_glr_plot_types_basic_fill_between.py` .. raw:: html
fill_between(x, y1, y2)
.. raw:: html
.. only:: html .. image:: /plot_types/basic/images/thumb/sphx_glr_stackplot_thumb.png :alt: stackplot(x, y) :ref:`sphx_glr_plot_types_basic_stackplot.py` .. raw:: html
stackplot(x, y)
.. raw:: html
Plots of arrays and fields -------------------------- Plotting for arrays of data ``Z(x, y)`` and fields ``U(x, y), V(x, y)``. .. raw:: html
.. raw:: html
.. only:: html .. image:: /plot_types/arrays/images/thumb/sphx_glr_imshow_thumb.png :alt: imshow(Z) :ref:`sphx_glr_plot_types_arrays_imshow.py` .. raw:: html
imshow(Z)
.. raw:: html
.. only:: html .. image:: /plot_types/arrays/images/thumb/sphx_glr_pcolormesh_thumb.png :alt: pcolormesh(X, Y, Z) :ref:`sphx_glr_plot_types_arrays_pcolormesh.py` .. raw:: html
pcolormesh(X, Y, Z)
.. raw:: html
.. only:: html .. image:: /plot_types/arrays/images/thumb/sphx_glr_contour_thumb.png :alt: contour(X, Y, Z) :ref:`sphx_glr_plot_types_arrays_contour.py` .. raw:: html
contour(X, Y, Z)
.. raw:: html
.. only:: html .. image:: /plot_types/arrays/images/thumb/sphx_glr_contourf_thumb.png :alt: contourf(X, Y, Z) :ref:`sphx_glr_plot_types_arrays_contourf.py` .. raw:: html
contourf(X, Y, Z)
.. raw:: html
.. only:: html .. image:: /plot_types/arrays/images/thumb/sphx_glr_barbs_thumb.png :alt: barbs(X, Y, U, V) :ref:`sphx_glr_plot_types_arrays_barbs.py` .. raw:: html
barbs(X, Y, U, V)
.. raw:: html
.. only:: html .. image:: /plot_types/arrays/images/thumb/sphx_glr_quiver_thumb.png :alt: quiver(X, Y, U, V) :ref:`sphx_glr_plot_types_arrays_quiver.py` .. raw:: html
quiver(X, Y, U, V)
.. raw:: html
.. only:: html .. image:: /plot_types/arrays/images/thumb/sphx_glr_streamplot_thumb.png :alt: streamplot(X, Y, U, V) :ref:`sphx_glr_plot_types_arrays_streamplot.py` .. raw:: html
streamplot(X, Y, U, V)
.. raw:: html
Statistics plots ---------------- Plots for statistical analysis. .. raw:: html
.. raw:: html
.. only:: html .. image:: /plot_types/stats/images/thumb/sphx_glr_hist_plot_thumb.png :alt: hist(x) :ref:`sphx_glr_plot_types_stats_hist_plot.py` .. raw:: html
hist(x)
.. raw:: html
.. only:: html .. image:: /plot_types/stats/images/thumb/sphx_glr_boxplot_plot_thumb.png :alt: boxplot(X) :ref:`sphx_glr_plot_types_stats_boxplot_plot.py` .. raw:: html
boxplot(X)
.. raw:: html
.. only:: html .. image:: /plot_types/stats/images/thumb/sphx_glr_errorbar_plot_thumb.png :alt: errorbar(x, y, yerr, xerr) :ref:`sphx_glr_plot_types_stats_errorbar_plot.py` .. raw:: html
errorbar(x, y, yerr, xerr)
.. raw:: html
.. only:: html .. image:: /plot_types/stats/images/thumb/sphx_glr_violin_thumb.png :alt: violinplot(D) :ref:`sphx_glr_plot_types_stats_violin.py` .. raw:: html
violinplot(D)
.. raw:: html
.. only:: html .. image:: /plot_types/stats/images/thumb/sphx_glr_eventplot_thumb.png :alt: eventplot(D) :ref:`sphx_glr_plot_types_stats_eventplot.py` .. raw:: html
eventplot(D)
.. raw:: html
.. only:: html .. image:: /plot_types/stats/images/thumb/sphx_glr_hist2d_thumb.png :alt: hist2d(x, y) :ref:`sphx_glr_plot_types_stats_hist2d.py` .. raw:: html
hist2d(x, y)
.. raw:: html
.. only:: html .. image:: /plot_types/stats/images/thumb/sphx_glr_hexbin_thumb.png :alt: hexbin(x, y, C) :ref:`sphx_glr_plot_types_stats_hexbin.py` .. raw:: html
hexbin(x, y, C)
.. raw:: html
.. only:: html .. image:: /plot_types/stats/images/thumb/sphx_glr_pie_thumb.png :alt: pie(x) :ref:`sphx_glr_plot_types_stats_pie.py` .. raw:: html
pie(x)
.. raw:: html
Unstructured coordinates ------------------------- Sometimes we collect data ``z`` at coordinates ``(x,y)`` and want to visualize as a contour. Instead of gridding the data and then using `~.axes.Axes.contour`, we can use a triangulation algorithm and fill the triangles. .. raw:: html
.. raw:: html
.. only:: html .. image:: /plot_types/unstructured/images/thumb/sphx_glr_tricontour_thumb.png :alt: tricontour(x, y, z) :ref:`sphx_glr_plot_types_unstructured_tricontour.py` .. raw:: html
tricontour(x, y, z)
.. raw:: html
.. only:: html .. image:: /plot_types/unstructured/images/thumb/sphx_glr_tricontourf_thumb.png :alt: tricontourf(x, y, z) :ref:`sphx_glr_plot_types_unstructured_tricontourf.py` .. raw:: html
tricontourf(x, y, z)
.. raw:: html
.. only:: html .. image:: /plot_types/unstructured/images/thumb/sphx_glr_tripcolor_thumb.png :alt: tripcolor(x, y, z) :ref:`sphx_glr_plot_types_unstructured_tripcolor.py` .. raw:: html
tripcolor(x, y, z)
.. raw:: html
.. only:: html .. image:: /plot_types/unstructured/images/thumb/sphx_glr_triplot_thumb.png :alt: triplot(x, y) :ref:`sphx_glr_plot_types_unstructured_triplot.py` .. raw:: html
triplot(x, y)
.. raw:: html
.. toctree:: :hidden: :includehidden: /plot_types/basic/index.rst /plot_types/arrays/index.rst /plot_types/stats/index.rst /plot_types/unstructured/index.rst .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-gallery .. container:: sphx-glr-download sphx-glr-download-python :download:`Download all examples in Python source code: plot_types_python.zip ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download all examples in Jupyter notebooks: plot_types_jupyter.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_