From e5a1331ea88cb4a34b749888385da11f2cc6595d Mon Sep 17 00:00:00 2001 From: Thomas Hisch Date: Sun, 9 Nov 2014 14:48:09 +0100 Subject: [PATCH] fix trailing whitespace --- examples/misc/svg_filter_pie.py | 8 ++++---- examples/mplot3d/mixed_subplots_demo.py | 2 +- examples/pylab_examples/README | 2 +- examples/pylab_examples/broken_axis.py | 2 +- examples/pylab_examples/demo_text_path.py | 2 +- examples/pylab_examples/fancybox_demo.py | 4 ++-- examples/pylab_examples/fancytextbox_demo.py | 4 ++-- examples/pylab_examples/hexbin_demo2.py | 2 +- examples/pylab_examples/image_nonuniform.py | 8 ++++---- examples/pylab_examples/multiple_yaxis_with_spines.py | 4 ++-- examples/pylab_examples/scatter_hist.py | 2 +- examples/pylab_examples/specgram_demo.py | 4 ++-- examples/statistics/violinplot_demo.py | 4 ++-- examples/style_sheets/plot_bmh.py | 2 +- examples/style_sheets/plot_fivethirtyeight.py | 2 +- examples/user_interfaces/fourier_demo_wx.py | 6 +++--- 16 files changed, 29 insertions(+), 29 deletions(-) diff --git a/examples/misc/svg_filter_pie.py b/examples/misc/svg_filter_pie.py index 924807c060f5..ffb79e3c8e76 100644 --- a/examples/misc/svg_filter_pie.py +++ b/examples/misc/svg_filter_pie.py @@ -3,7 +3,7 @@ The pie chart drawing code is borrowed from pie_demo.py Note that the filtering effects are only effective if your svg rederer -support it. +support it. """ @@ -62,16 +62,16 @@ - + - - diff --git a/examples/mplot3d/mixed_subplots_demo.py b/examples/mplot3d/mixed_subplots_demo.py index 4fbd4df875bd..cca9cc604cdc 100644 --- a/examples/mplot3d/mixed_subplots_demo.py +++ b/examples/mplot3d/mixed_subplots_demo.py @@ -23,7 +23,7 @@ def f(t): fig = plt.figure(figsize=plt.figaspect(2.)) fig.suptitle('A tale of 2 subplots') ax = fig.add_subplot(2, 1, 1) -l = ax.plot(t1, f(t1), 'bo', +l = ax.plot(t1, f(t1), 'bo', t2, f(t2), 'k--', markerfacecolor='green') ax.grid(True) ax.set_ylabel('Damped oscillation') diff --git a/examples/pylab_examples/README b/examples/pylab_examples/README index e45e071ea9ce..ca0d48e04541 100644 --- a/examples/pylab_examples/README +++ b/examples/pylab_examples/README @@ -1,4 +1,4 @@ -Here are some demos of how to use the matplotlib. +Here are some demos of how to use the matplotlib. -- data_helper.py - a convenience module to load some data from the diff --git a/examples/pylab_examples/broken_axis.py b/examples/pylab_examples/broken_axis.py index f6cb3cabf20c..b44951810a23 100644 --- a/examples/pylab_examples/broken_axis.py +++ b/examples/pylab_examples/broken_axis.py @@ -11,7 +11,7 @@ 0.043, 0.021, 0.138, 0.075, 0.109, 0.195, 0.05 , 0.074, 0.079, 0.155, 0.02 , 0.01 , 0.061, 0.008]) -# Now let's make two outlier points which are far away from everything. +# Now let's make two outlier points which are far away from everything. pts[[3, 14]] += .8 # If we were to simply plot pts, we'd lose most of the interesting diff --git a/examples/pylab_examples/demo_text_path.py b/examples/pylab_examples/demo_text_path.py index 91ca65ab993a..40292f567fd4 100644 --- a/examples/pylab_examples/demo_text_path.py +++ b/examples/pylab_examples/demo_text_path.py @@ -92,7 +92,7 @@ def draw(self, renderer=None): p1 = PathPatch(text_path, ec="w", lw=3, fc="w", alpha=0.9, transform=IdentityTransform()) - p2 = PathPatch(text_path, ec="none", fc="k", + p2 = PathPatch(text_path, ec="none", fc="k", transform=IdentityTransform()) offsetbox2 = AuxTransformBox(IdentityTransform()) diff --git a/examples/pylab_examples/fancybox_demo.py b/examples/pylab_examples/fancybox_demo.py index 79b43e6e34c4..410fbf8890ee 100644 --- a/examples/pylab_examples/fancybox_demo.py +++ b/examples/pylab_examples/fancybox_demo.py @@ -10,7 +10,7 @@ def draw_bbox(ax, bb): # boxstyle=square with pad=0, i.e. bbox itself. p_bbox = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), + abs(bb.width), abs(bb.height), boxstyle="square,pad=0.", ec="k", fc="none", zorder=10., ) @@ -113,7 +113,7 @@ def test4(ax): p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), abs(bb.width), abs(bb.height), boxstyle="round,pad=0.3", - mutation_aspect=.5, + mutation_aspect=.5, fc=(1., 0.8, 1.), ec=(1., 0.5, 1.)) diff --git a/examples/pylab_examples/fancytextbox_demo.py b/examples/pylab_examples/fancytextbox_demo.py index 11f37ba77345..1fa56e3ba920 100644 --- a/examples/pylab_examples/fancytextbox_demo.py +++ b/examples/pylab_examples/fancytextbox_demo.py @@ -1,7 +1,7 @@ import matplotlib.pyplot as plt plt.text(0.6, 0.5, "test", size=50, rotation=30., - ha="center", va="center", + ha="center", va="center", bbox=dict(boxstyle="round", ec=(1., 0.5, 0.5), fc=(1., 0.8, 0.8), @@ -9,7 +9,7 @@ ) plt.text(0.5, 0.4, "test", size=50, rotation=-30., - ha="right", va="top", + ha="right", va="top", bbox=dict(boxstyle="square", ec=(1., 0.5, 0.5), fc=(1., 0.8, 0.8), diff --git a/examples/pylab_examples/hexbin_demo2.py b/examples/pylab_examples/hexbin_demo2.py index 6d8f74752c92..44f858bc591f 100644 --- a/examples/pylab_examples/hexbin_demo2.py +++ b/examples/pylab_examples/hexbin_demo2.py @@ -39,7 +39,7 @@ gridsize = 30 plt.subplot(211) -plt.hexbin(x, y, C=z, gridsize=gridsize, marginals=True, cmap=plt.cm.RdBu, +plt.hexbin(x, y, C=z, gridsize=gridsize, marginals=True, cmap=plt.cm.RdBu, vmax=abs(z).max(), vmin=-abs(z).max()) plt.axis([xmin, xmax, ymin, ymax]) cb = plt.colorbar() diff --git a/examples/pylab_examples/image_nonuniform.py b/examples/pylab_examples/image_nonuniform.py index c488504c86c7..b073593c9403 100644 --- a/examples/pylab_examples/image_nonuniform.py +++ b/examples/pylab_examples/image_nonuniform.py @@ -20,7 +20,7 @@ fig = figure() fig.suptitle('NonUniformImage class') ax = fig.add_subplot(221) -im = NonUniformImage(ax, interpolation=interp, extent=(-4, 4, -4, 4), +im = NonUniformImage(ax, interpolation=interp, extent=(-4, 4, -4, 4), cmap=cm.Purples) im.set_data(x, y, z) ax.images.append(im) @@ -29,7 +29,7 @@ ax.set_title(interp) ax = fig.add_subplot(222) -im = NonUniformImage(ax, interpolation=interp, extent=(-64, 64, -4, 4), +im = NonUniformImage(ax, interpolation=interp, extent=(-64, 64, -4, 4), cmap=cm.Purples) im.set_data(x2, y, z) ax.images.append(im) @@ -40,7 +40,7 @@ interp = 'bilinear' ax = fig.add_subplot(223) -im = NonUniformImage(ax, interpolation=interp, extent=(-4, 4, -4, 4), +im = NonUniformImage(ax, interpolation=interp, extent=(-4, 4, -4, 4), cmap=cm.Purples) im.set_data(x, y, z) ax.images.append(im) @@ -49,7 +49,7 @@ ax.set_title(interp) ax = fig.add_subplot(224) -im = NonUniformImage(ax, interpolation=interp, extent=(-64, 64, -4, 4), +im = NonUniformImage(ax, interpolation=interp, extent=(-64, 64, -4, 4), cmap=cm.Purples) im.set_data(x2, y, z) ax.images.append(im) diff --git a/examples/pylab_examples/multiple_yaxis_with_spines.py b/examples/pylab_examples/multiple_yaxis_with_spines.py index ebe46354147f..98532d31b047 100644 --- a/examples/pylab_examples/multiple_yaxis_with_spines.py +++ b/examples/pylab_examples/multiple_yaxis_with_spines.py @@ -16,8 +16,8 @@ def make_patch_spines_invisible(ax): # Offset the right spine of par2. The ticks and label have already been # placed on the right by twinx above. par2.spines["right"].set_position(("axes", 1.2)) -# Having been created by twinx, par2 has its frame off, so the line of its -# detached spine is invisible. First, activate the frame but make the patch +# Having been created by twinx, par2 has its frame off, so the line of its +# detached spine is invisible. First, activate the frame but make the patch # and spines invisible. make_patch_spines_invisible(par2) # Second, show the right spine. diff --git a/examples/pylab_examples/scatter_hist.py b/examples/pylab_examples/scatter_hist.py index 098520df188e..16ee2e0d1d2c 100644 --- a/examples/pylab_examples/scatter_hist.py +++ b/examples/pylab_examples/scatter_hist.py @@ -8,7 +8,7 @@ nullfmt = NullFormatter() # no labels -# definitions for the axes +# definitions for the axes left, width = 0.1, 0.65 bottom, height = 0.1, 0.65 bottom_h = left_h = left+width+0.02 diff --git a/examples/pylab_examples/specgram_demo.py b/examples/pylab_examples/specgram_demo.py index d5cced232d7b..edfc4c38fbaf 100644 --- a/examples/pylab_examples/specgram_demo.py +++ b/examples/pylab_examples/specgram_demo.py @@ -24,7 +24,7 @@ ax1 = subplot(211) plot(t, x) -subplot(212, sharex=ax1) -Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900, +subplot(212, sharex=ax1) +Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900, cmap=cm.gist_heat) show() diff --git a/examples/statistics/violinplot_demo.py b/examples/statistics/violinplot_demo.py index 35c3c365b702..1bfcccf061e0 100644 --- a/examples/statistics/violinplot_demo.py +++ b/examples/statistics/violinplot_demo.py @@ -13,11 +13,11 @@ fig, axes = plt.subplots(nrows=2, ncols=3, figsize=(6, 6)) -axes[0, 0].violinplot(data, pos, points=20, widths=0.1, +axes[0, 0].violinplot(data, pos, points=20, widths=0.1, showmeans=True, showextrema=True, showmedians=True) axes[0, 0].set_title('Custom violinplot 1', fontsize=fs) -axes[0, 1].violinplot(data, pos, points=40, widths=0.3, +axes[0, 1].violinplot(data, pos, points=40, widths=0.3, showmeans=True, showextrema=True, showmedians=True, bw_method='silverman') axes[0, 1].set_title('Custom violinplot 2', fontsize=fs) diff --git a/examples/style_sheets/plot_bmh.py b/examples/style_sheets/plot_bmh.py index 0f2fef624a86..f44c319a675e 100644 --- a/examples/style_sheets/plot_bmh.py +++ b/examples/style_sheets/plot_bmh.py @@ -1,5 +1,5 @@ """ -This example demonstrates the "bmh" style, which is the design used in the +This example demonstrates the "bmh" style, which is the design used in the Bayesian Methods for Hackers online book. """ from numpy.random import beta diff --git a/examples/style_sheets/plot_fivethirtyeight.py b/examples/style_sheets/plot_fivethirtyeight.py index 4bed0a5d2dde..21f919274366 100644 --- a/examples/style_sheets/plot_fivethirtyeight.py +++ b/examples/style_sheets/plot_fivethirtyeight.py @@ -1,5 +1,5 @@ """ -This shows an example of the "fivethirtyeight" styling, which +This shows an example of the "fivethirtyeight" styling, which tries to replicate the styles from FiveThirtyEight.com. """ diff --git a/examples/user_interfaces/fourier_demo_wx.py b/examples/user_interfaces/fourier_demo_wx.py index c0c718799e99..e5652b805727 100644 --- a/examples/user_interfaces/fourier_demo_wx.py +++ b/examples/user_interfaces/fourier_demo_wx.py @@ -11,7 +11,7 @@ class Knob(object): """ - Knob - simple class with a "setKnob" method. + Knob - simple class with a "setKnob" method. A Knob instance is attached to a Param instance, e.g., param.attach(knob) Base class is for documentation purposes. """ @@ -25,8 +25,8 @@ class Param(object): The idea of the "Param" class is that some parameter in the GUI may have several knobs that both control it and reflect the parameter's state, e.g. a slider, text, and dragging can all change the value of the frequency in - the waveform of this example. - The class allows a cleaner way to update/"feedback" to the other knobs when + the waveform of this example. + The class allows a cleaner way to update/"feedback" to the other knobs when one is being changed. Also, this class handles min/max constraints for all the knobs. Idea - knob list - in "set" method, knob object is passed as well