Navigation

  • Scipy lecture notes »
  • Collapse to compact view Collapse document to compact view
  • Edit Improve this page:
    Edit it on Github.

Code samples for Matplotlib¶

The examples here are only examples relevant to the points raised in this chapter. The matplotlib documentation comes with a much more exhaustive gallery.

../../../_images/sphx_glr_plot_pie_thumb.png

Pie chart

../../../_images/sphx_glr_plot_good_thumb.png

A simple, good-looking plot

../../../_images/sphx_glr_plot_scatter_thumb.png

Plotting a scatter of points

../../../_images/sphx_glr_plot_multiplot_thumb.png

Subplots

../../../_images/sphx_glr_plot_bad_thumb.png

A simple plotting example

../../../_images/sphx_glr_plot_axes_thumb.png

Simple axes example

../../../_images/sphx_glr_plot_subplot-horizontal_thumb.png

Horizontal arrangement of subplots

../../../_images/sphx_glr_plot_subplot-vertical_thumb.png

Subplot plot arrangement vertical

../../../_images/sphx_glr_plot_plot3d_thumb.png

3D plotting

../../../_images/sphx_glr_plot_imshow_thumb.png

Imshow elaborate

../../../_images/sphx_glr_plot_quiver_thumb.png

Plotting a vector field: quiver

../../../_images/sphx_glr_plot_polar_thumb.png

Plotting in polar coordinnates

../../../_images/sphx_glr_plot_contour_thumb.png

Displaying the contours of a function

../../../_images/sphx_glr_plot_ugly_thumb.png

A example of plotting not quite right

../../../_images/sphx_glr_plot_plot_thumb.png

Plot and filled plots

../../../_images/sphx_glr_plot_bar_thumb.png

Bar plots

../../../_images/sphx_glr_plot_subplot-grid_thumb.png

Subplot grid

../../../_images/sphx_glr_plot_axes-2_thumb.png

Axes

../../../_images/sphx_glr_plot_grid_thumb.png

Grid

../../../_images/sphx_glr_plot_plot3d-2_thumb.png

3D plotting

../../../_images/sphx_glr_plot_gridspec_thumb.png

GridSpec

../../../_images/sphx_glr_plot_text_thumb.png

Demo text printing

Code for the chapter’s exercises¶

../../../_images/sphx_glr_plot_exercise_1_thumb.png

Exercise 1

../../../_images/sphx_glr_plot_exercise_4_thumb.png

Exercise 4

../../../_images/sphx_glr_plot_exercise_3_thumb.png

Exercise 3

../../../_images/sphx_glr_plot_exercise_5_thumb.png

Exercise 5

../../../_images/sphx_glr_plot_exercise_6_thumb.png

Exercise 6

../../../_images/sphx_glr_plot_exercise_2_thumb.png

Exercise 2

../../../_images/sphx_glr_plot_exercise_7_thumb.png

Exercise 7

../../../_images/sphx_glr_plot_exercise_8_thumb.png

Exercise 8

../../../_images/sphx_glr_plot_exercise_9_thumb.png

Exercise 9

../../../_images/sphx_glr_plot_exercise_10_thumb.png

Exercise

Example demoing choices for an option¶

../../../_images/sphx_glr_plot_color_thumb.png

The colors matplotlib line plots

../../../_images/sphx_glr_plot_linewidth_thumb.png

Linewidth

../../../_images/sphx_glr_plot_alpha_thumb.png

Alpha: transparency

../../../_images/sphx_glr_plot_aliased_thumb.png

Aliased versus anti-aliased

../../../_images/sphx_glr_plot_antialiased_thumb.png

Aliased versus anti-aliased

../../../_images/sphx_glr_plot_ms_thumb.png

Marker size

../../../_images/sphx_glr_plot_mew_thumb.png

Marker edge width

../../../_images/sphx_glr_plot_mec_thumb.png

Marker edge color

../../../_images/sphx_glr_plot_mfc_thumb.png

Marker face color

../../../_images/sphx_glr_plot_colormaps_thumb.png

Colormaps

../../../_images/sphx_glr_plot_solid_capstyle_thumb.png

Solid cap style

../../../_images/sphx_glr_plot_solid_joinstyle_thumb.png

Solid joint style

../../../_images/sphx_glr_plot_dash_capstyle_thumb.png

Dash capstyle

../../../_images/sphx_glr_plot_dash_joinstyle_thumb.png

Dash join style

../../../_images/sphx_glr_plot_linestyles_thumb.png

Linestyles

../../../_images/sphx_glr_plot_markers_thumb.png

Markers

../../../_images/sphx_glr_plot_ticks_thumb.png

Locators for tick on axis

Code generating the summary figures with a title¶

../../../_images/sphx_glr_plot_polar_ext_thumb.png

Plotting in polar, decorated

../../../_images/sphx_glr_plot_plot3d_ext_thumb.png

3D plotting vignette

../../../_images/sphx_glr_plot_plot_ext_thumb.png

Plot example vignette

../../../_images/sphx_glr_plot_multiplot_ext_thumb.png

Multiple plots vignette

../../../_images/sphx_glr_plot_boxplot_ext_thumb.png

Boxplot with matplotlib

../../../_images/sphx_glr_plot_scatter_ext_thumb.png

Plot scatter decorated

../../../_images/sphx_glr_plot_pie_ext_thumb.png

Pie chart vignette

../../../_images/sphx_glr_plot_bar_ext_thumb.png

Bar plot advanced

../../../_images/sphx_glr_plot_quiver_ext_thumb.png

Plotting quiver decorated

../../../_images/sphx_glr_plot_imshow_ext_thumb.png

Imshow demo

../../../_images/sphx_glr_plot_contour_ext_thumb.png

Display the contours of a function

../../../_images/sphx_glr_plot_grid_ext_thumb.png

Grid elaborate

../../../_images/sphx_glr_plot_text_ext_thumb.png

Text printing decorated

Download all examples in Python source code: auto_examples_python.zip
Download all examples in Jupyter notebooks: auto_examples_jupyter.zip

Gallery generated by Sphinx-Gallery

Table Of Contents

  • Code samples for Matplotlib
  • Code for the chapter’s exercises
  • Example demoing choices for an option
  • Code generating the summary figures with a title

This Page

  • Show Source

Quick search

Navigation

  • Scipy lecture notes »
  • Collapse to compact view Collapse document to compact view
  • Edit Improve this page:
    Edit it on Github.
© Copyright 2012,2013,2015,2016,2017,2018,2019,2020,2021,2022. Created using Sphinx 1.7.9.