From 82c52f357dae06be17d501d7dc0ef915414d74a1 Mon Sep 17 00:00:00 2001 From: yinleon Date: Mon, 6 Mar 2017 18:02:31 -0800 Subject: [PATCH 1/7] changes for MEP12/sphinx-gallery compliance --- examples/axisartist/demo_axisline_style.py | 11 ++++++++--- examples/event_handling/resample.py | 15 ++++++++++----- examples/mplot3d/lines3d.py | 8 ++++---- examples/mplot3d/lorenz_attractor.py | 11 ++++++----- examples/mplot3d/mixed_subplots.py | 9 ++++----- examples/mplot3d/offset.py | 6 +++--- examples/pylab_examples/bar_stacked.py | 13 +++++++++---- examples/pylab_examples/dolphin.py | 7 ++++++- examples/pylab_examples/fill_between_demo.py | 8 +++++--- examples/pylab_examples/geo_demo.py | 9 ++++++--- examples/pylab_examples/log_test.py | 5 ++++- examples/pylab_examples/mri_demo.py | 12 +++++++----- 12 files changed, 72 insertions(+), 42 deletions(-) diff --git a/examples/axisartist/demo_axisline_style.py b/examples/axisartist/demo_axisline_style.py index 21fb11564a31..9f35faf38975 100644 --- a/examples/axisartist/demo_axisline_style.py +++ b/examples/axisartist/demo_axisline_style.py @@ -1,8 +1,9 @@ """ -=================== -Demo Axisline Style -=================== +================ +Axis Line Styles +================ +This example shows some configurations for axis style. """ from mpl_toolkits.axisartist.axislines import SubplotZero @@ -15,10 +16,14 @@ fig.add_subplot(ax) for direction in ["xzero", "yzero"]: + # adds arrows at the ends of each axis ax.axis[direction].set_axisline_style("-|>") + + # adds X and Y-axis from the origin ax.axis[direction].set_visible(True) for direction in ["left", "right", "bottom", "top"]: + # hides boarders ax.axis[direction].set_visible(False) x = np.linspace(-0.5, 1., 100) diff --git a/examples/event_handling/resample.py b/examples/event_handling/resample.py index 049dd449fdcc..44e9b9fe4283 100644 --- a/examples/event_handling/resample.py +++ b/examples/event_handling/resample.py @@ -1,19 +1,24 @@ """ -======== -Resample -======== +=============== +Resampling Data +=============== + + +Downsampling lowers the sample rate or sample size of a signal. In +this tutorial, the signal is downsampled when the plot is adjusted +through dragging and zooming. """ + import numpy as np import matplotlib.pyplot as plt - # A class that will downsample the data and recompute when zoomed. class DataDisplayDownsampler(object): def __init__(self, xdata, ydata): self.origYData = ydata self.origXData = xdata - self.ratio = 5 + self.ratio = 50 self.delta = xdata[-1] - xdata[0] def downsample(self, xstart, xend): diff --git a/examples/mplot3d/lines3d.py b/examples/mplot3d/lines3d.py index a1504de63e22..34ef9328c663 100644 --- a/examples/mplot3d/lines3d.py +++ b/examples/mplot3d/lines3d.py @@ -1,9 +1,9 @@ ''' -=================== -3D parametric curve -=================== +================ +Parametric Curve +================ -Demonstrating plotting a parametric curve in 3D. +This example demonstrates plotting a parametric curve in 3D. ''' import matplotlib as mpl diff --git a/examples/mplot3d/lorenz_attractor.py b/examples/mplot3d/lorenz_attractor.py index 54967e219b72..c90b8b9f8fd3 100644 --- a/examples/mplot3d/lorenz_attractor.py +++ b/examples/mplot3d/lorenz_attractor.py @@ -1,10 +1,11 @@ ''' -==================== -The Lorenz Attractor -==================== +================ +Lorenz Attractor +================ + +This is an example of plotting Edward Lorenz's 1963 "Deterministic +Nonperiodic Flow" in a 3-dimensional space using mplot3d. -Plot of the Lorenz Attractor based on Edward Lorenz's 1963 "Deterministic -Nonperiodic Flow" publication. http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2 Note: Because this is a simple non-linear ODE, it would be more easily diff --git a/examples/mplot3d/mixed_subplots.py b/examples/mplot3d/mixed_subplots.py index 00d691813485..f6121a021602 100644 --- a/examples/mplot3d/mixed_subplots.py +++ b/examples/mplot3d/mixed_subplots.py @@ -1,9 +1,8 @@ """ -================== -2D and 3D subplots -================== - -Demonstrate the mixing of 2d and 3d subplots. +============================================ +Demonstrate the mixing of 2d and 3d subplots +============================================ +This example shows a how to plot a 2D and 3D plot on the same figure. """ from mpl_toolkits.mplot3d import Axes3D diff --git a/examples/mplot3d/offset.py b/examples/mplot3d/offset.py index a92757cd9d96..da846c8cc26a 100644 --- a/examples/mplot3d/offset.py +++ b/examples/mplot3d/offset.py @@ -1,7 +1,7 @@ ''' -=================== -Offset text display -=================== +========================= +Automatic Text Offsetting +========================= This example demonstrates mplot3d's offset text display. As one rotates the 3D figure, the offsets should remain oriented the diff --git a/examples/pylab_examples/bar_stacked.py b/examples/pylab_examples/bar_stacked.py index 6330474506f3..b60426323225 100644 --- a/examples/pylab_examples/bar_stacked.py +++ b/examples/pylab_examples/bar_stacked.py @@ -1,10 +1,15 @@ """ -=========== -Bar Stacked -=========== +================= +Stacked Bar Graph +================= + +This is an example of creating a stacked bar plot with error bars +using `plt.bar`. Note the parameters `yerr` used for error bars, and +`bottom` to stack the women's bars on top of the men's bars. -A stacked bar plot with errorbars. """ + +# a stacked bar plot with errorbars import numpy as np import matplotlib.pyplot as plt diff --git a/examples/pylab_examples/dolphin.py b/examples/pylab_examples/dolphin.py index 2f3763614c06..700f99d3e40e 100644 --- a/examples/pylab_examples/dolphin.py +++ b/examples/pylab_examples/dolphin.py @@ -1,9 +1,14 @@ """ ======= -Dolphin +Dophins ======= + +This example shows how to draw, and manipulate shapes given verticies +and nodes using the patches, path and transforms classes. + """ + import matplotlib.cm as cm import matplotlib.pyplot as plt from matplotlib.patches import Circle, PathPatch diff --git a/examples/pylab_examples/fill_between_demo.py b/examples/pylab_examples/fill_between_demo.py index 4aa8d4821d9a..a338b197216f 100644 --- a/examples/pylab_examples/fill_between_demo.py +++ b/examples/pylab_examples/fill_between_demo.py @@ -1,9 +1,11 @@ """ -================= -Fill Between Demo -================= +============================== +Filling the area between lines +============================== +This example shows how to use fill_between() to color between lines based on user-defined logic. """ + import matplotlib.pyplot as plt import numpy as np diff --git a/examples/pylab_examples/geo_demo.py b/examples/pylab_examples/geo_demo.py index 42cd9173a823..b9df747af7cb 100644 --- a/examples/pylab_examples/geo_demo.py +++ b/examples/pylab_examples/geo_demo.py @@ -1,9 +1,12 @@ """ -======== -Geo Demo -======== +====================== +Geographic Projections +====================== +This shows 4 possible projections using subplot. +Matplotlib also supports the Basemaps Toolkit for geographic projections. """ + import matplotlib.pyplot as plt plt.figure() diff --git a/examples/pylab_examples/log_test.py b/examples/pylab_examples/log_test.py index 55ff68c50e59..fa9aca22becf 100644 --- a/examples/pylab_examples/log_test.py +++ b/examples/pylab_examples/log_test.py @@ -1,9 +1,12 @@ """ ======== -Log Test +Log Axis ======== +This is an example of assigning a log-scale for the x-axis using +`semilogx`. """ + import matplotlib.pyplot as plt import numpy as np diff --git a/examples/pylab_examples/mri_demo.py b/examples/pylab_examples/mri_demo.py index 0f2e873c1ae9..027bdc16c255 100644 --- a/examples/pylab_examples/mri_demo.py +++ b/examples/pylab_examples/mri_demo.py @@ -1,11 +1,13 @@ """ -======== -MRI Demo -======== +=== +MRI +=== -Displays an MRI image. -""" +This example illustrates how to read an image (of an MRI) into a numpy +array, and display it in greyscale using `ax.imshow`. + +""" import matplotlib.pyplot as plt import matplotlib.cbook as cbook From f9c9db18786e9ce03c0167c31262f0e53133ce12 Mon Sep 17 00:00:00 2001 From: Leon Yin Date: Mon, 6 Mar 2017 18:49:56 -0800 Subject: [PATCH 2/7] DOC FIX reviewer's comments --- examples/axisartist/demo_axisline_style.py | 4 ++-- examples/event_handling/poly_editor.py | 3 +-- examples/event_handling/resample.py | 2 +- examples/mplot3d/mixed_subplots.py | 1 + examples/pylab_examples/dolphin.py | 11 +++++------ examples/pylab_examples/fill_between_demo.py | 3 ++- examples/pylab_examples/geo_demo.py | 5 ++++- examples/pylab_examples/mri_demo.py | 4 ++-- 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/examples/axisartist/demo_axisline_style.py b/examples/axisartist/demo_axisline_style.py index 9f35faf38975..7823e9c52b12 100644 --- a/examples/axisartist/demo_axisline_style.py +++ b/examples/axisartist/demo_axisline_style.py @@ -1,6 +1,6 @@ """ ================ -Axis Line Styles +Axis line styles ================ This example shows some configurations for axis style. @@ -23,7 +23,7 @@ ax.axis[direction].set_visible(True) for direction in ["left", "right", "bottom", "top"]: - # hides boarders + # hides borders ax.axis[direction].set_visible(False) x = np.linspace(-0.5, 1., 100) diff --git a/examples/event_handling/poly_editor.py b/examples/event_handling/poly_editor.py index 9224997bbb25..045d85aa517d 100644 --- a/examples/event_handling/poly_editor.py +++ b/examples/event_handling/poly_editor.py @@ -4,8 +4,7 @@ =========== This is an example to show how to build cross-GUI applications using -matplotlib event handling to interact with objects on the canvas - +matplotlib event handling to interact with objects on the canvas. """ import numpy as np from matplotlib.lines import Line2D diff --git a/examples/event_handling/resample.py b/examples/event_handling/resample.py index 44e9b9fe4283..e43bbdc70a19 100644 --- a/examples/event_handling/resample.py +++ b/examples/event_handling/resample.py @@ -18,7 +18,7 @@ class DataDisplayDownsampler(object): def __init__(self, xdata, ydata): self.origYData = ydata self.origXData = xdata - self.ratio = 50 + self.ratio = 5 self.delta = xdata[-1] - xdata[0] def downsample(self, xstart, xend): diff --git a/examples/mplot3d/mixed_subplots.py b/examples/mplot3d/mixed_subplots.py index f6121a021602..6416711903d3 100644 --- a/examples/mplot3d/mixed_subplots.py +++ b/examples/mplot3d/mixed_subplots.py @@ -2,6 +2,7 @@ ============================================ Demonstrate the mixing of 2d and 3d subplots ============================================ + This example shows a how to plot a 2D and 3D plot on the same figure. """ diff --git a/examples/pylab_examples/dolphin.py b/examples/pylab_examples/dolphin.py index 700f99d3e40e..418fd05d40d6 100644 --- a/examples/pylab_examples/dolphin.py +++ b/examples/pylab_examples/dolphin.py @@ -1,11 +1,10 @@ """ -======= -Dophins -======= +======== +Dolphins +======== - -This example shows how to draw, and manipulate shapes given verticies -and nodes using the patches, path and transforms classes. +This example shows how to draw, and manipulate shapes given vertices +and nodes using the `patches`, `path` and `transforms` classes. """ diff --git a/examples/pylab_examples/fill_between_demo.py b/examples/pylab_examples/fill_between_demo.py index a338b197216f..2b065ed42f60 100644 --- a/examples/pylab_examples/fill_between_demo.py +++ b/examples/pylab_examples/fill_between_demo.py @@ -3,7 +3,8 @@ Filling the area between lines ============================== -This example shows how to use fill_between() to color between lines based on user-defined logic. +This example shows how to use `fill_between` to color between lines based on +user-defined logic. """ import matplotlib.pyplot as plt diff --git a/examples/pylab_examples/geo_demo.py b/examples/pylab_examples/geo_demo.py index b9df747af7cb..ebca23272d76 100644 --- a/examples/pylab_examples/geo_demo.py +++ b/examples/pylab_examples/geo_demo.py @@ -4,7 +4,10 @@ ====================== This shows 4 possible projections using subplot. -Matplotlib also supports the Basemaps Toolkit for geographic projections. +Matplotlib also supports +Basemaps Toolkit and +Cartopy +for geographic projections. """ import matplotlib.pyplot as plt diff --git a/examples/pylab_examples/mri_demo.py b/examples/pylab_examples/mri_demo.py index 027bdc16c255..837344cf84f9 100644 --- a/examples/pylab_examples/mri_demo.py +++ b/examples/pylab_examples/mri_demo.py @@ -4,8 +4,8 @@ === -This example illustrates how to read an image (of an MRI) into a numpy -array, and display it in greyscale using `ax.imshow`. +This example illustrates how to read an image (of an MRI) into a NumPy +array, and display it in greyscale using `imshow`. """ From e6792056292014738fb5e6d419b01ebd15024f1f Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Fri, 10 Mar 2017 15:01:19 -0800 Subject: [PATCH 3/7] FIX blank space issue for pep8 --- examples/event_handling/resample.py | 1 + examples/pylab_examples/geo_demo.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/event_handling/resample.py b/examples/event_handling/resample.py index e43bbdc70a19..f440af19a2d4 100644 --- a/examples/event_handling/resample.py +++ b/examples/event_handling/resample.py @@ -13,6 +13,7 @@ import numpy as np import matplotlib.pyplot as plt + # A class that will downsample the data and recompute when zoomed. class DataDisplayDownsampler(object): def __init__(self, xdata, ydata): diff --git a/examples/pylab_examples/geo_demo.py b/examples/pylab_examples/geo_demo.py index ebca23272d76..21859314ddae 100644 --- a/examples/pylab_examples/geo_demo.py +++ b/examples/pylab_examples/geo_demo.py @@ -6,7 +6,7 @@ This shows 4 possible projections using subplot. Matplotlib also supports Basemaps Toolkit and -Cartopy +Cartopy for geographic projections. """ From 860a33130e8be2703d2e33d5dfc30b6db70e2988 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 10 Jul 2017 18:49:17 -0500 Subject: [PATCH 4/7] DOC: fix typos / markup --- examples/pylab_examples/bar_stacked.py | 4 ++-- examples/pylab_examples/dolphin.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/pylab_examples/bar_stacked.py b/examples/pylab_examples/bar_stacked.py index b60426323225..aebedf591b32 100644 --- a/examples/pylab_examples/bar_stacked.py +++ b/examples/pylab_examples/bar_stacked.py @@ -4,8 +4,8 @@ ================= This is an example of creating a stacked bar plot with error bars -using `plt.bar`. Note the parameters `yerr` used for error bars, and -`bottom` to stack the women's bars on top of the men's bars. +using `plt.bar`. Note the parameters *yerr* used for error bars, and +*bottom* to stack the women's bars on top of the men's bars. """ diff --git a/examples/pylab_examples/dolphin.py b/examples/pylab_examples/dolphin.py index 418fd05d40d6..f705eb18e314 100644 --- a/examples/pylab_examples/dolphin.py +++ b/examples/pylab_examples/dolphin.py @@ -4,7 +4,7 @@ ======== This example shows how to draw, and manipulate shapes given vertices -and nodes using the `patches`, `path` and `transforms` classes. +and nodes using the `Patches`, `Path` and `Transforms` classes. """ From e3429cde480dd2aee9f7350e45cda74e69dd2aa2 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 10 Jul 2017 22:02:37 -0500 Subject: [PATCH 5/7] DOC: tweak re sampling demo to use different resampling method Fixed target number of points instead of fixed data reduction. --- examples/event_handling/resample.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/examples/event_handling/resample.py b/examples/event_handling/resample.py index f440af19a2d4..b9811942b857 100644 --- a/examples/event_handling/resample.py +++ b/examples/event_handling/resample.py @@ -3,11 +3,9 @@ Resampling Data =============== - Downsampling lowers the sample rate or sample size of a signal. In this tutorial, the signal is downsampled when the plot is adjusted through dragging and zooming. - """ import numpy as np @@ -19,18 +17,28 @@ class DataDisplayDownsampler(object): def __init__(self, xdata, ydata): self.origYData = ydata self.origXData = xdata - self.ratio = 5 + self.max_points = 50 self.delta = xdata[-1] - xdata[0] def downsample(self, xstart, xend): - # Very simple downsampling that takes the points within the range - # and picks every Nth point + # get the points in the view range mask = (self.origXData > xstart) & (self.origXData < xend) - xdata = self.origXData[mask] - xdata = xdata[::self.ratio] + # dilate the mask by one to catch the points just outside + # of the view range to not truncate the line + mask = np.convolve([1, 1], mask, mode='same').astype(bool) + # sort out how many points to drop + ratio = max(np.sum(mask) // self.max_points, 1) + # mask data + xdata = self.origXData[mask] ydata = self.origYData[mask] - ydata = ydata[::self.ratio] + + # downsample data + xdata = xdata[::ratio] + ydata = ydata[::ratio] + + print("using {} of {} visible points".format( + len(ydata), np.sum(mask))) return xdata, ydata @@ -43,8 +51,9 @@ def update(self, ax): self.line.set_data(*self.downsample(xstart, xend)) ax.figure.canvas.draw_idle() + # Create a signal -xdata = np.linspace(16, 365, 365-16) +xdata = np.linspace(16, 365, (365-16)*4) ydata = np.sin(2*np.pi*xdata/153) + np.cos(2*np.pi*xdata/127) d = DataDisplayDownsampler(xdata, ydata) @@ -57,5 +66,5 @@ def update(self, ax): # Connect for changing the view limits ax.callbacks.connect('xlim_changed', d.update) - +ax.set_xlim(16, 365) plt.show() From c3a6534a5c17287cd7959eff6dbf9837b827451a Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 10 Jul 2017 22:18:11 -0500 Subject: [PATCH 6/7] DOC: fix typos and links --- examples/mplot3d/lorenz_attractor.py | 8 ++++---- examples/mplot3d/mixed_subplots.py | 3 +-- examples/pylab_examples/bar_stacked.py | 5 +++-- examples/pylab_examples/geo_demo.py | 9 ++++----- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/examples/mplot3d/lorenz_attractor.py b/examples/mplot3d/lorenz_attractor.py index c90b8b9f8fd3..47b21292b4cb 100644 --- a/examples/mplot3d/lorenz_attractor.py +++ b/examples/mplot3d/lorenz_attractor.py @@ -3,10 +3,10 @@ Lorenz Attractor ================ -This is an example of plotting Edward Lorenz's 1963 "Deterministic -Nonperiodic Flow" in a 3-dimensional space using mplot3d. - -http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2 +This is an example of plotting Edward Lorenz's 1963 `"Deterministic +Nonperiodic Flow" +`_ +in a 3-dimensional space using mplot3d. Note: Because this is a simple non-linear ODE, it would be more easily done using SciPy's ode solver, but this approach depends only diff --git a/examples/mplot3d/mixed_subplots.py b/examples/mplot3d/mixed_subplots.py index 6416711903d3..a03f76d67cd5 100644 --- a/examples/mplot3d/mixed_subplots.py +++ b/examples/mplot3d/mixed_subplots.py @@ -1,11 +1,10 @@ """ ============================================ -Demonstrate the mixing of 2d and 3d subplots +Demonstrate the mixing of 2D and 3D subplots ============================================ This example shows a how to plot a 2D and 3D plot on the same figure. """ - from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np diff --git a/examples/pylab_examples/bar_stacked.py b/examples/pylab_examples/bar_stacked.py index aebedf591b32..10ed47729c12 100644 --- a/examples/pylab_examples/bar_stacked.py +++ b/examples/pylab_examples/bar_stacked.py @@ -4,8 +4,9 @@ ================= This is an example of creating a stacked bar plot with error bars -using `plt.bar`. Note the parameters *yerr* used for error bars, and -*bottom* to stack the women's bars on top of the men's bars. +using `~matplotlib.pyplot.bar`. Note the parameters *yerr* used for +error bars, and *bottom* to stack the women's bars on top of the men's +bars. """ diff --git a/examples/pylab_examples/geo_demo.py b/examples/pylab_examples/geo_demo.py index 21859314ddae..dedf6397af7d 100644 --- a/examples/pylab_examples/geo_demo.py +++ b/examples/pylab_examples/geo_demo.py @@ -3,11 +3,10 @@ Geographic Projections ====================== -This shows 4 possible projections using subplot. -Matplotlib also supports -Basemaps Toolkit and -Cartopy -for geographic projections. +This shows 4 possible projections using subplot. Matplotlib also +supports `Basemaps Toolkit `_ and +`Cartopy `_ for geographic projections. + """ import matplotlib.pyplot as plt From 20b6309846363f44c60dda06d306075f3b1dc493 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 11 Jul 2017 09:22:59 -0500 Subject: [PATCH 7/7] DOC: Minor typos, https, and pep8 --- examples/event_handling/poly_editor.py | 17 ++++++++++------- examples/mplot3d/mixed_subplots.py | 6 +++--- examples/pylab_examples/bar_stacked.py | 1 - examples/pylab_examples/geo_demo.py | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/examples/event_handling/poly_editor.py b/examples/event_handling/poly_editor.py index 045d85aa517d..13b139d56bab 100644 --- a/examples/event_handling/poly_editor.py +++ b/examples/event_handling/poly_editor.py @@ -4,7 +4,7 @@ =========== This is an example to show how to build cross-GUI applications using -matplotlib event handling to interact with objects on the canvas. +Matplotlib event handling to interact with objects on the canvas. """ import numpy as np from matplotlib.lines import Line2D @@ -33,17 +33,19 @@ class PolygonInteractor(object): def __init__(self, ax, poly): if poly.figure is None: - raise RuntimeError('You must first add the polygon to a figure or canvas before defining the interactor') + raise RuntimeError('You must first add the polygon to a figure ' + 'or canvas before defining the interactor') self.ax = ax canvas = poly.figure.canvas self.poly = poly x, y = zip(*self.poly.xy) - self.line = Line2D(x, y, marker='o', markerfacecolor='r', animated=True) + self.line = Line2D(x, y, + marker='o', markerfacecolor='r', + animated=True) self.ax.add_line(self.line) - #self._update_line(poly) - cid = self.poly.add_callback(self.poly_changed) + self.cid = self.poly.add_callback(self.poly_changed) self._ind = None # the active vert canvas.mpl_connect('draw_event', self.draw_callback) @@ -112,7 +114,9 @@ def key_press_callback(self, event): elif event.key == 'd': ind = self.get_ind_under_point(event) if ind is not None: - self.poly.xy = [tup for i, tup in enumerate(self.poly.xy) if i != ind] + self.poly.xy = [tup + for i, tup in enumerate(self.poly.xy) + if i != ind] self.line.set_data(zip(*self.poly.xy)) elif event.key == 'i': xys = self.poly.get_transform().transform(self.poly.xy) @@ -172,7 +176,6 @@ def motion_notify_callback(self, event): ax.add_patch(poly) p = PolygonInteractor(ax, poly) - #ax.add_line(p.line) ax.set_title('Click and drag a point to move it') ax.set_xlim((-2, 2)) ax.set_ylim((-2, 2)) diff --git a/examples/mplot3d/mixed_subplots.py b/examples/mplot3d/mixed_subplots.py index a03f76d67cd5..37962d654d94 100644 --- a/examples/mplot3d/mixed_subplots.py +++ b/examples/mplot3d/mixed_subplots.py @@ -1,7 +1,7 @@ """ -============================================ -Demonstrate the mixing of 2D and 3D subplots -============================================ +================================= +2D and 3D *Axes* in same *Figure* +================================= This example shows a how to plot a 2D and 3D plot on the same figure. """ diff --git a/examples/pylab_examples/bar_stacked.py b/examples/pylab_examples/bar_stacked.py index 10ed47729c12..d7fb25b080c6 100644 --- a/examples/pylab_examples/bar_stacked.py +++ b/examples/pylab_examples/bar_stacked.py @@ -10,7 +10,6 @@ """ -# a stacked bar plot with errorbars import numpy as np import matplotlib.pyplot as plt diff --git a/examples/pylab_examples/geo_demo.py b/examples/pylab_examples/geo_demo.py index dedf6397af7d..8692432eca65 100644 --- a/examples/pylab_examples/geo_demo.py +++ b/examples/pylab_examples/geo_demo.py @@ -4,7 +4,7 @@ ====================== This shows 4 possible projections using subplot. Matplotlib also -supports `Basemaps Toolkit `_ and +supports `Basemaps Toolkit `_ and `Cartopy `_ for geographic projections. """ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy