From 4f0a48177dded1eb461ec350885caf7f686b660a Mon Sep 17 00:00:00 2001 From: Thomas Hisch Date: Sun, 14 Sep 2014 15:21:18 +0200 Subject: [PATCH] examples: remove newlines @EOF + remove spaces/tabs from emtpy lines steps to reproduce (autopep8 -i --select E111 */*.py) + remove changes in non-empty lines Signed-off-by: Thomas Hisch --- examples/color/color_cycle_demo.py | 2 -- examples/event_handling/data_browser.py | 1 - .../event_handling/figure_axes_enter_leave.py | 2 -- examples/event_handling/idle_and_timeout.py | 2 -- examples/event_handling/path_editor.py | 2 -- examples/event_handling/pick_event_demo.py | 1 - examples/event_handling/pick_event_demo2.py | 5 ----- examples/event_handling/poly_editor.py | 1 - examples/event_handling/zoom_window.py | 1 - .../images_contours_and_fields/image_demo.py | 1 - .../streamplot_demo_features.py | 1 - .../streamplot_demo_masking.py | 1 - examples/misc/image_thumbnail.py | 1 - examples/misc/svg_filter_pie.py | 2 +- examples/mplot3d/2dcollections3d_demo.py | 1 - examples/mplot3d/bars3d_demo.py | 1 - examples/mplot3d/contour3d_demo.py | 1 - examples/mplot3d/contour3d_demo2.py | 1 - examples/mplot3d/contour3d_demo3.py | 1 - examples/mplot3d/contourf3d_demo.py | 1 - examples/mplot3d/contourf3d_demo2.py | 1 - examples/mplot3d/hist3d_demo.py | 1 - examples/mplot3d/lines3d_demo.py | 1 - examples/mplot3d/lorenz_attractor.py | 1 - examples/mplot3d/mixed_subplots_demo.py | 1 - examples/mplot3d/offset_demo.py | 1 - examples/mplot3d/polys3d_demo.py | 1 - examples/mplot3d/quiver3d_demo.py | 1 - examples/mplot3d/rotate_axes3d_demo.py | 1 - examples/mplot3d/scatter3d_demo.py | 1 - examples/mplot3d/subplot3d_demo.py | 1 - examples/mplot3d/surface3d_demo.py | 1 - examples/mplot3d/surface3d_demo2.py | 1 - examples/mplot3d/surface3d_demo3.py | 1 - examples/mplot3d/text3d_demo.py | 1 - examples/mplot3d/wire3d_demo.py | 1 - examples/pylab_examples/anchored_artists.py | 4 ---- examples/pylab_examples/arctest.py | 1 - examples/pylab_examples/axis_equal_demo.py | 5 ----- examples/pylab_examples/barcode_demo.py | 1 - examples/pylab_examples/boxplot_demo.py | 1 - examples/pylab_examples/clippedline.py | 2 -- examples/pylab_examples/cohere_demo.py | 2 -- examples/pylab_examples/colours.py | 1 - examples/pylab_examples/contour_label_demo.py | 1 - examples/pylab_examples/contourf_demo.py | 1 - examples/pylab_examples/contourf_log.py | 2 -- examples/pylab_examples/coords_report.py | 1 - examples/pylab_examples/csd_demo.py | 2 -- examples/pylab_examples/cursor_demo.py | 1 - examples/pylab_examples/custom_cmap.py | 1 - .../pylab_examples/custom_figure_class.py | 1 - examples/pylab_examples/dashpointlabel.py | 1 - examples/pylab_examples/demo_agg_filter.py | 4 +--- examples/pylab_examples/demo_ribbon_box.py | 1 - examples/pylab_examples/demo_text_path.py | 8 +++---- examples/pylab_examples/demo_tight_layout.py | 3 --- examples/pylab_examples/ellipse_collection.py | 2 -- examples/pylab_examples/fancybox_demo.py | 8 +++---- examples/pylab_examples/fancybox_demo2.py | 1 - examples/pylab_examples/fancytextbox_demo.py | 2 +- examples/pylab_examples/figimage_demo.py | 3 --- examples/pylab_examples/figure_title.py | 1 - examples/pylab_examples/finance_work2.py | 2 -- examples/pylab_examples/hexbin_demo2.py | 1 - examples/pylab_examples/hyperlinks.py | 1 - examples/pylab_examples/image_clip_path.py | 1 - examples/pylab_examples/image_demo.py | 1 - examples/pylab_examples/image_masked.py | 1 - examples/pylab_examples/interp_demo.py | 1 - examples/pylab_examples/layer_images.py | 2 -- examples/pylab_examples/legend_demo2.py | 3 --- examples/pylab_examples/line_collection.py | 2 -- examples/pylab_examples/log_bar.py | 2 -- examples/pylab_examples/mathtext_demo.py | 1 - examples/pylab_examples/matplotlib_icon.py | 1 - examples/pylab_examples/multi_image.py | 6 ----- examples/pylab_examples/multiline.py | 4 ++-- examples/pylab_examples/pcolor_log.py | 1 - examples/pylab_examples/plotfile_demo.py | 2 -- examples/pylab_examples/pstest.py | 1 - examples/pylab_examples/quiver_demo.py | 1 - examples/pylab_examples/step_demo.py | 1 - examples/pylab_examples/system_monitor.py | 5 ----- examples/pylab_examples/transoffset.py | 1 - .../pylab_examples/usetex_baseline_test.py | 1 - examples/pylab_examples/xcorr_demo.py | 1 - examples/specialty_plots/hinton_demo.py | 1 - examples/statistics/errorbar_demo.py | 1 - examples/statistics/errorbar_demo_features.py | 1 - examples/statistics/errorbar_limits.py | 1 - examples/units/annotate_with_units.py | 1 - examples/units/artist_tests.py | 1 - examples/units/units_scatter.py | 1 - examples/user_interfaces/embedding_in_gtk3.py | 1 - .../embedding_in_gtk3_panzoom.py | 1 - examples/user_interfaces/embedding_in_tk.py | 2 -- examples/user_interfaces/embedding_in_wx3.py | 1 - examples/user_interfaces/embedding_in_wx5.py | 1 - examples/user_interfaces/fourier_demo_wx.py | 22 +++++++++---------- .../histogram_demo_canvasagg.py | 3 --- .../user_interfaces/lineprops_dialog_gtk.py | 1 - examples/user_interfaces/mathtext_wx.py | 1 - examples/user_interfaces/svg_histogram.py | 11 ++++------ examples/user_interfaces/svg_tooltip.py | 4 ++-- examples/widgets/buttons.py | 1 - 106 files changed, 30 insertions(+), 175 deletions(-) diff --git a/examples/color/color_cycle_demo.py b/examples/color/color_cycle_demo.py index b453de4c1aed..70ec991f9bc9 100644 --- a/examples/color/color_cycle_demo.py +++ b/examples/color/color_cycle_demo.py @@ -30,5 +30,3 @@ # Tweak spacing between subplots to prevent labels from overlapping plt.subplots_adjust(hspace=0.3) plt.show() - - diff --git a/examples/event_handling/data_browser.py b/examples/event_handling/data_browser.py index 1cb1dd82073d..dba43a26473f 100644 --- a/examples/event_handling/data_browser.py +++ b/examples/event_handling/data_browser.py @@ -79,4 +79,3 @@ def update(self): fig.canvas.mpl_connect('key_press_event', browser.onpress) plt.show() - diff --git a/examples/event_handling/figure_axes_enter_leave.py b/examples/event_handling/figure_axes_enter_leave.py index 53fc37f3260e..7ca0ee39d522 100644 --- a/examples/event_handling/figure_axes_enter_leave.py +++ b/examples/event_handling/figure_axes_enter_leave.py @@ -46,5 +46,3 @@ def leave_figure(event): fig2.canvas.mpl_connect('axes_leave_event', leave_axes) plt.show() - - diff --git a/examples/event_handling/idle_and_timeout.py b/examples/event_handling/idle_and_timeout.py index d39e375675f2..184f0eb53d84 100644 --- a/examples/event_handling/idle_and_timeout.py +++ b/examples/event_handling/idle_and_timeout.py @@ -33,5 +33,3 @@ def on_idle(event): fig.canvas.mpl_connect('idle_event', on_idle) plt.show() - - diff --git a/examples/event_handling/path_editor.py b/examples/event_handling/path_editor.py index 7ab23ef18693..dfe6e52b86a0 100644 --- a/examples/event_handling/path_editor.py +++ b/examples/event_handling/path_editor.py @@ -136,5 +136,3 @@ def motion_notify_callback(self, event): ax.set_ylim(-3,4) plt.show() - - diff --git a/examples/event_handling/pick_event_demo.py b/examples/event_handling/pick_event_demo.py index 7fcca05b53cf..4c54b5f3bb3b 100755 --- a/examples/event_handling/pick_event_demo.py +++ b/examples/event_handling/pick_event_demo.py @@ -172,4 +172,3 @@ def onpick4(event): plt.show() - diff --git a/examples/event_handling/pick_event_demo2.py b/examples/event_handling/pick_event_demo2.py index cc14509a5b79..9c9f44e8b20b 100644 --- a/examples/event_handling/pick_event_demo2.py +++ b/examples/event_handling/pick_event_demo2.py @@ -36,8 +36,3 @@ def onpick(event): fig.canvas.mpl_connect('pick_event', onpick) plt.show() - - - - - diff --git a/examples/event_handling/poly_editor.py b/examples/event_handling/poly_editor.py index 31be9a98e2f4..6f4c9c447b5d 100644 --- a/examples/event_handling/poly_editor.py +++ b/examples/event_handling/poly_editor.py @@ -159,4 +159,3 @@ def motion_notify_callback(self, event): ax.set_xlim((-2,2)) ax.set_ylim((-2,2)) plt.show() - diff --git a/examples/event_handling/zoom_window.py b/examples/event_handling/zoom_window.py index 3fee7c00dfbe..6a6826011e44 100644 --- a/examples/event_handling/zoom_window.py +++ b/examples/event_handling/zoom_window.py @@ -36,4 +36,3 @@ def onpress(event): figsrc.canvas.mpl_connect('button_press_event', onpress) show() - diff --git a/examples/images_contours_and_fields/image_demo.py b/examples/images_contours_and_fields/image_demo.py index 83e49217816f..73eea1e4eabb 100644 --- a/examples/images_contours_and_fields/image_demo.py +++ b/examples/images_contours_and_fields/image_demo.py @@ -10,4 +10,3 @@ plt.imshow(image) plt.axis('off') # clear x- and y-axes plt.show() - diff --git a/examples/images_contours_and_fields/streamplot_demo_features.py b/examples/images_contours_and_fields/streamplot_demo_features.py index 2cc10bf877e8..b04263f8f36d 100644 --- a/examples/images_contours_and_fields/streamplot_demo_features.py +++ b/examples/images_contours_and_fields/streamplot_demo_features.py @@ -26,4 +26,3 @@ ax2.streamplot(X, Y, U, V, density=0.6, color='k', linewidth=lw) plt.show() - diff --git a/examples/images_contours_and_fields/streamplot_demo_masking.py b/examples/images_contours_and_fields/streamplot_demo_masking.py index ce0ac99b9410..885a26760cc8 100644 --- a/examples/images_contours_and_fields/streamplot_demo_masking.py +++ b/examples/images_contours_and_fields/streamplot_demo_masking.py @@ -24,4 +24,3 @@ interpolation='nearest', cmap=plt.cm.gray) plt.show() - diff --git a/examples/misc/image_thumbnail.py b/examples/misc/image_thumbnail.py index c3fb57231e9e..3d5be8f7eef0 100644 --- a/examples/misc/image_thumbnail.py +++ b/examples/misc/image_thumbnail.py @@ -27,4 +27,3 @@ outfile = os.path.join(outdir, basename) fig = image.thumbnail(fname, outfile, scale=0.15) print('saved thumbnail of %s to %s'%(fname, outfile)) - diff --git a/examples/misc/svg_filter_pie.py b/examples/misc/svg_filter_pie.py index 088a8b1fd35b..8b0defd5c58a 100644 --- a/examples/misc/svg_filter_pie.py +++ b/examples/misc/svg_filter_pie.py @@ -39,7 +39,7 @@ s.set_gid(w.get_gid()+"_shadow") s.set_zorder(w.get_zorder() - 0.1) ax.add_patch(s) - + # save from StringIO import StringIO diff --git a/examples/mplot3d/2dcollections3d_demo.py b/examples/mplot3d/2dcollections3d_demo.py index 2f53f542c6f8..099fce832076 100644 --- a/examples/mplot3d/2dcollections3d_demo.py +++ b/examples/mplot3d/2dcollections3d_demo.py @@ -21,4 +21,3 @@ ax.set_zlim3d(0, 1) plt.show() - diff --git a/examples/mplot3d/bars3d_demo.py b/examples/mplot3d/bars3d_demo.py index 8dc76c24cf41..d378af98b51d 100644 --- a/examples/mplot3d/bars3d_demo.py +++ b/examples/mplot3d/bars3d_demo.py @@ -19,4 +19,3 @@ ax.set_zlabel('Z') plt.show() - diff --git a/examples/mplot3d/contour3d_demo.py b/examples/mplot3d/contour3d_demo.py index 32bb8d3abef6..6c3fba8ce6b6 100644 --- a/examples/mplot3d/contour3d_demo.py +++ b/examples/mplot3d/contour3d_demo.py @@ -9,4 +9,3 @@ ax.clabel(cset, fontsize=9, inline=1) plt.show() - diff --git a/examples/mplot3d/contour3d_demo2.py b/examples/mplot3d/contour3d_demo2.py index 62e79841942a..64e053cbb64b 100644 --- a/examples/mplot3d/contour3d_demo2.py +++ b/examples/mplot3d/contour3d_demo2.py @@ -9,4 +9,3 @@ ax.clabel(cset, fontsize=9, inline=1) plt.show() - diff --git a/examples/mplot3d/contour3d_demo3.py b/examples/mplot3d/contour3d_demo3.py index 125b3bf2fa17..f0b2fbf23f2a 100644 --- a/examples/mplot3d/contour3d_demo3.py +++ b/examples/mplot3d/contour3d_demo3.py @@ -18,4 +18,3 @@ ax.set_zlim(-100, 100) plt.show() - diff --git a/examples/mplot3d/contourf3d_demo.py b/examples/mplot3d/contourf3d_demo.py index c2c28877ea67..4811ecd72360 100644 --- a/examples/mplot3d/contourf3d_demo.py +++ b/examples/mplot3d/contourf3d_demo.py @@ -9,4 +9,3 @@ ax.clabel(cset, fontsize=9, inline=1) plt.show() - diff --git a/examples/mplot3d/contourf3d_demo2.py b/examples/mplot3d/contourf3d_demo2.py index f20f029acf7a..21bae939dc12 100644 --- a/examples/mplot3d/contourf3d_demo2.py +++ b/examples/mplot3d/contourf3d_demo2.py @@ -23,4 +23,3 @@ ax.set_zlim(-100, 100) plt.show() - diff --git a/examples/mplot3d/hist3d_demo.py b/examples/mplot3d/hist3d_demo.py index 0af55a4288db..2a57fdb6ecb7 100644 --- a/examples/mplot3d/hist3d_demo.py +++ b/examples/mplot3d/hist3d_demo.py @@ -20,4 +20,3 @@ ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color='b', zsort='average') plt.show() - diff --git a/examples/mplot3d/lines3d_demo.py b/examples/mplot3d/lines3d_demo.py index 883657d9ef43..cc349bda2230 100644 --- a/examples/mplot3d/lines3d_demo.py +++ b/examples/mplot3d/lines3d_demo.py @@ -16,4 +16,3 @@ ax.legend() plt.show() - diff --git a/examples/mplot3d/lorenz_attractor.py b/examples/mplot3d/lorenz_attractor.py index e88e4f6b4c44..ec464a896061 100644 --- a/examples/mplot3d/lorenz_attractor.py +++ b/examples/mplot3d/lorenz_attractor.py @@ -47,4 +47,3 @@ def lorenz(x, y, z, s=10, r=28, b=2.667) : ax.set_title("Lorenz Attractor") plt.show() - diff --git a/examples/mplot3d/mixed_subplots_demo.py b/examples/mplot3d/mixed_subplots_demo.py index 7826f7e0ec32..8f73799c2959 100644 --- a/examples/mplot3d/mixed_subplots_demo.py +++ b/examples/mplot3d/mixed_subplots_demo.py @@ -47,4 +47,3 @@ def f(t): ax.set_zlim3d(-1, 1) plt.show() - diff --git a/examples/mplot3d/offset_demo.py b/examples/mplot3d/offset_demo.py index 3edb9cbff8bc..7b80ff2864a6 100644 --- a/examples/mplot3d/offset_demo.py +++ b/examples/mplot3d/offset_demo.py @@ -23,4 +23,3 @@ ax.set_zlim(0, 2) plt.show() - diff --git a/examples/mplot3d/polys3d_demo.py b/examples/mplot3d/polys3d_demo.py index ed64d3ae9f58..e98e553b3483 100644 --- a/examples/mplot3d/polys3d_demo.py +++ b/examples/mplot3d/polys3d_demo.py @@ -30,4 +30,3 @@ ax.set_zlim3d(0, 1) plt.show() - diff --git a/examples/mplot3d/quiver3d_demo.py b/examples/mplot3d/quiver3d_demo.py index 38fc7e2600e0..1051c2fe3ff1 100644 --- a/examples/mplot3d/quiver3d_demo.py +++ b/examples/mplot3d/quiver3d_demo.py @@ -17,4 +17,3 @@ ax.quiver(x, y, z, u, v, w, length=0.1) plt.show() - diff --git a/examples/mplot3d/rotate_axes3d_demo.py b/examples/mplot3d/rotate_axes3d_demo.py index ad8a1f70b6ee..55ec41177dea 100644 --- a/examples/mplot3d/rotate_axes3d_demo.py +++ b/examples/mplot3d/rotate_axes3d_demo.py @@ -12,4 +12,3 @@ for angle in range(0, 360): ax.view_init(30, angle) plt.draw() - diff --git a/examples/mplot3d/scatter3d_demo.py b/examples/mplot3d/scatter3d_demo.py index a45b6ec68920..6423786100d7 100644 --- a/examples/mplot3d/scatter3d_demo.py +++ b/examples/mplot3d/scatter3d_demo.py @@ -20,4 +20,3 @@ def randrange(n, vmin, vmax): ax.set_zlabel('Z Label') plt.show() - diff --git a/examples/mplot3d/subplot3d_demo.py b/examples/mplot3d/subplot3d_demo.py index 23c758fc6b6e..693599da57a4 100644 --- a/examples/mplot3d/subplot3d_demo.py +++ b/examples/mplot3d/subplot3d_demo.py @@ -29,4 +29,3 @@ ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) plt.show() - diff --git a/examples/mplot3d/surface3d_demo.py b/examples/mplot3d/surface3d_demo.py index f8c0e28beb81..bf27c10099f4 100644 --- a/examples/mplot3d/surface3d_demo.py +++ b/examples/mplot3d/surface3d_demo.py @@ -21,4 +21,3 @@ fig.colorbar(surf, shrink=0.5, aspect=5) plt.show() - diff --git a/examples/mplot3d/surface3d_demo2.py b/examples/mplot3d/surface3d_demo2.py index 80684036b552..95ecd5618b5c 100644 --- a/examples/mplot3d/surface3d_demo2.py +++ b/examples/mplot3d/surface3d_demo2.py @@ -14,4 +14,3 @@ ax.plot_surface(x, y, z, rstride=4, cstride=4, color='b') plt.show() - diff --git a/examples/mplot3d/surface3d_demo3.py b/examples/mplot3d/surface3d_demo3.py index 5d4038f94383..ba1310e31e41 100644 --- a/examples/mplot3d/surface3d_demo3.py +++ b/examples/mplot3d/surface3d_demo3.py @@ -27,4 +27,3 @@ ax.w_zaxis.set_major_locator(LinearLocator(6)) plt.show() - diff --git a/examples/mplot3d/text3d_demo.py b/examples/mplot3d/text3d_demo.py index 7208f4c283db..182d6c11dfa2 100644 --- a/examples/mplot3d/text3d_demo.py +++ b/examples/mplot3d/text3d_demo.py @@ -25,4 +25,3 @@ ax.set_zlabel('Z axis') plt.show() - diff --git a/examples/mplot3d/wire3d_demo.py b/examples/mplot3d/wire3d_demo.py index 8bb749738c8a..db8601f52171 100644 --- a/examples/mplot3d/wire3d_demo.py +++ b/examples/mplot3d/wire3d_demo.py @@ -8,4 +8,3 @@ ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) plt.show() - diff --git a/examples/pylab_examples/anchored_artists.py b/examples/pylab_examples/anchored_artists.py index 8946cc54b1cf..fd888048f54e 100644 --- a/examples/pylab_examples/anchored_artists.py +++ b/examples/pylab_examples/anchored_artists.py @@ -108,7 +108,3 @@ def __init__(self, width, height, xdescent, ydescent, plt.draw() plt.show() - - - - diff --git a/examples/pylab_examples/arctest.py b/examples/pylab_examples/arctest.py index 983ba122397f..1de761364717 100644 --- a/examples/pylab_examples/arctest.py +++ b/examples/pylab_examples/arctest.py @@ -16,4 +16,3 @@ def f(t): setp(l, 'markerfacecolor', 'b') show() - diff --git a/examples/pylab_examples/axis_equal_demo.py b/examples/pylab_examples/axis_equal_demo.py index e850a847427b..33c75a694e86 100644 --- a/examples/pylab_examples/axis_equal_demo.py +++ b/examples/pylab_examples/axis_equal_demo.py @@ -29,8 +29,3 @@ title('still equal after adding line',fontsize=10) show() - - - - - diff --git a/examples/pylab_examples/barcode_demo.py b/examples/pylab_examples/barcode_demo.py index 2e4eba0c1b1e..2d31af2421e2 100644 --- a/examples/pylab_examples/barcode_demo.py +++ b/examples/pylab_examples/barcode_demo.py @@ -23,4 +23,3 @@ show() - diff --git a/examples/pylab_examples/boxplot_demo.py b/examples/pylab_examples/boxplot_demo.py index d220adc3541c..3db92bfe9730 100644 --- a/examples/pylab_examples/boxplot_demo.py +++ b/examples/pylab_examples/boxplot_demo.py @@ -55,4 +55,3 @@ boxplot(data) show() - diff --git a/examples/pylab_examples/clippedline.py b/examples/pylab_examples/clippedline.py index 292eef80b1fe..e2ab84547b0e 100644 --- a/examples/pylab_examples/clippedline.py +++ b/examples/pylab_examples/clippedline.py @@ -55,5 +55,3 @@ def draw(self, renderer): ax.set_xlim(10,30) ax.set_ylim(-1.1,1.1) show() - - diff --git a/examples/pylab_examples/cohere_demo.py b/examples/pylab_examples/cohere_demo.py index 52e0fc32a061..b3f2cbb7fa51 100644 --- a/examples/pylab_examples/cohere_demo.py +++ b/examples/pylab_examples/cohere_demo.py @@ -32,5 +32,3 @@ cxy, f = plt.cohere(s1, s2, 256, 1./dt) plt.ylabel('coherence') plt.show() - - diff --git a/examples/pylab_examples/colours.py b/examples/pylab_examples/colours.py index a206ba50af97..911e58b78d47 100644 --- a/examples/pylab_examples/colours.py +++ b/examples/pylab_examples/colours.py @@ -50,4 +50,3 @@ def get_colours(n): (base[start+1] * x)) return [pastel(c) for c in colours[0:n]] - diff --git a/examples/pylab_examples/contour_label_demo.py b/examples/pylab_examples/contour_label_demo.py index 59fcf5492ebd..e85d7f4336a3 100644 --- a/examples/pylab_examples/contour_label_demo.py +++ b/examples/pylab_examples/contour_label_demo.py @@ -85,4 +85,3 @@ def __repr__(self): plt.title("$100^Z$") plt.show() - diff --git a/examples/pylab_examples/contourf_demo.py b/examples/pylab_examples/contourf_demo.py index a7859bb59fa9..64345fdb546e 100755 --- a/examples/pylab_examples/contourf_demo.py +++ b/examples/pylab_examples/contourf_demo.py @@ -104,4 +104,3 @@ ax.locator_params(nbins=4) plt.show() - diff --git a/examples/pylab_examples/contourf_log.py b/examples/pylab_examples/contourf_log.py index de24cf0d2f08..cdfe51ef4f77 100644 --- a/examples/pylab_examples/contourf_log.py +++ b/examples/pylab_examples/contourf_log.py @@ -44,5 +44,3 @@ cbar = P.colorbar() P.show() - - diff --git a/examples/pylab_examples/coords_report.py b/examples/pylab_examples/coords_report.py index be5f67f1d26c..738408f4ec3c 100644 --- a/examples/pylab_examples/coords_report.py +++ b/examples/pylab_examples/coords_report.py @@ -16,4 +16,3 @@ def millions(x): plot(x, y, 'o') show() - diff --git a/examples/pylab_examples/csd_demo.py b/examples/pylab_examples/csd_demo.py index 86a4963d6942..35bf20fa6770 100644 --- a/examples/pylab_examples/csd_demo.py +++ b/examples/pylab_examples/csd_demo.py @@ -32,5 +32,3 @@ cxy, f = plt.csd(s1, s2, 256, 1./dt) plt.ylabel('CSD (db)') plt.show() - - diff --git a/examples/pylab_examples/cursor_demo.py b/examples/pylab_examples/cursor_demo.py index 07c6a36cfba2..a6e4a3612c2d 100755 --- a/examples/pylab_examples/cursor_demo.py +++ b/examples/pylab_examples/cursor_demo.py @@ -78,4 +78,3 @@ def mouse_move(self, event): ax.plot(t, s, 'o') axis([0,1,-1,1]) show() - diff --git a/examples/pylab_examples/custom_cmap.py b/examples/pylab_examples/custom_cmap.py index e26475726165..1b0987b173d7 100644 --- a/examples/pylab_examples/custom_cmap.py +++ b/examples/pylab_examples/custom_cmap.py @@ -189,4 +189,3 @@ plt.suptitle('Custom Blue-Red colormaps', fontsize=16) plt.show() - diff --git a/examples/pylab_examples/custom_figure_class.py b/examples/pylab_examples/custom_figure_class.py index ae15cbb08868..ccf1ef060acb 100644 --- a/examples/pylab_examples/custom_figure_class.py +++ b/examples/pylab_examples/custom_figure_class.py @@ -19,4 +19,3 @@ def __init__(self, *args, **kwargs): ax.plot([1,2,3]) show() - diff --git a/examples/pylab_examples/dashpointlabel.py b/examples/pylab_examples/dashpointlabel.py index 7a1ab43bb9f8..319077716d1f 100644 --- a/examples/pylab_examples/dashpointlabel.py +++ b/examples/pylab_examples/dashpointlabel.py @@ -35,4 +35,3 @@ ax.set_ylim((0.0, 5.0)) plt.show() - diff --git a/examples/pylab_examples/demo_agg_filter.py b/examples/pylab_examples/demo_agg_filter.py index 3838f257821c..689809e910ec 100644 --- a/examples/pylab_examples/demo_agg_filter.py +++ b/examples/pylab_examples/demo_agg_filter.py @@ -311,7 +311,7 @@ def light_filter_pie(ax): if 1: - + plt.figure(1, figsize=(6, 6)) plt.subplots_adjust(left=0.05, right=0.95) @@ -330,5 +330,3 @@ def light_filter_pie(ax): ax.set_frame_on(True) plt.show() - - diff --git a/examples/pylab_examples/demo_ribbon_box.py b/examples/pylab_examples/demo_ribbon_box.py index 4ff65f460d3f..21dac5c24bf9 100644 --- a/examples/pylab_examples/demo_ribbon_box.py +++ b/examples/pylab_examples/demo_ribbon_box.py @@ -132,4 +132,3 @@ def draw(self, renderer, *args, **kwargs): fig.savefig('ribbon_box.png') plt.show() - diff --git a/examples/pylab_examples/demo_text_path.py b/examples/pylab_examples/demo_text_path.py index e381ebec1fb2..1294d0a87ada 100644 --- a/examples/pylab_examples/demo_text_path.py +++ b/examples/pylab_examples/demo_text_path.py @@ -31,7 +31,7 @@ def __init__(self, path, bbox_image, **kwargs): def set_facecolor(self, color): """simply ignore facecolor""" mpatches.PathPatch.set_facecolor(self, "none") - + def _init_bbox_image(self, im): bbox_image = BboxImage(self.get_window_extent, @@ -55,7 +55,7 @@ def draw(self, renderer=None): if 1: usetex = plt.rcParams["text.usetex"] - + fig = plt.figure(1) # EXAMPLE 1 @@ -86,10 +86,10 @@ def draw(self, renderer=None): r = r"\mbox{textpath supports mathtext \& \TeX}" else: r = r"textpath supports mathtext & TeX" - + text_path = TextPath((0, 0), r, size=20, usetex=usetex) - + p1 = PathPatch(text_path, ec="w", lw=3, fc="w", alpha=0.9, transform=IdentityTransform()) p2 = PathPatch(text_path, ec="none", fc="k", diff --git a/examples/pylab_examples/demo_tight_layout.py b/examples/pylab_examples/demo_tight_layout.py index e3134d5d8e65..789dab3944ce 100644 --- a/examples/pylab_examples/demo_tight_layout.py +++ b/examples/pylab_examples/demo_tight_layout.py @@ -102,6 +102,3 @@ def example_plot(ax): gs2.update(top=top, bottom=bottom) plt.show() - - - diff --git a/examples/pylab_examples/ellipse_collection.py b/examples/pylab_examples/ellipse_collection.py index a6a06a5f4054..f4597d32e8c9 100644 --- a/examples/pylab_examples/ellipse_collection.py +++ b/examples/pylab_examples/ellipse_collection.py @@ -30,5 +30,3 @@ cbar = plt.colorbar(ec) cbar.set_label('X+Y') plt.show() - - diff --git a/examples/pylab_examples/fancybox_demo.py b/examples/pylab_examples/fancybox_demo.py index 3eb24036894a..d5bd070ded10 100644 --- a/examples/pylab_examples/fancybox_demo.py +++ b/examples/pylab_examples/fancybox_demo.py @@ -67,7 +67,7 @@ def test2(ax): # draws control points for the fancy box. #l = p_fancy.get_path().vertices #ax.plot(l[:,0], l[:,1], ".") - + draw_bbox(ax, bb) @@ -92,7 +92,7 @@ def test3(ax): # draws control points for the fancy box. #l = p_fancy.get_path().vertices #ax.plot(l[:,0], l[:,1], ".") - + draw_bbox(ax, bb) @@ -100,7 +100,7 @@ def test4(ax): # When the aspect ratio of the axes is not 1, the fancy box may # not be what you expected (green) - + p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), abs(bb.width), abs(bb.height), boxstyle="round,pad=0.2", @@ -122,7 +122,7 @@ def test4(ax): ax.text(0.1, 0.8, ' boxstyle="round,pad=0.3"\n mutation\\_aspect=.5', size=10, transform=ax.transAxes) - + draw_bbox(ax, bb) diff --git a/examples/pylab_examples/fancybox_demo2.py b/examples/pylab_examples/fancybox_demo2.py index ae6cb99b680e..dc953d4866d5 100644 --- a/examples/pylab_examples/fancybox_demo2.py +++ b/examples/pylab_examples/fancybox_demo2.py @@ -16,4 +16,3 @@ bbox=dict(boxstyle=stylename, fc="w", ec="k")) plt.draw() plt.show() - diff --git a/examples/pylab_examples/fancytextbox_demo.py b/examples/pylab_examples/fancytextbox_demo.py index 1bd547342639..dbd7ff8b95cf 100644 --- a/examples/pylab_examples/fancytextbox_demo.py +++ b/examples/pylab_examples/fancytextbox_demo.py @@ -16,6 +16,6 @@ ) ) - + plt.draw() plt.show() diff --git a/examples/pylab_examples/figimage_demo.py b/examples/pylab_examples/figimage_demo.py index dc86be33e0be..322fb9f0ffaa 100644 --- a/examples/pylab_examples/figimage_demo.py +++ b/examples/pylab_examples/figimage_demo.py @@ -17,6 +17,3 @@ im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet, origin='lower') plt.show() - - - diff --git a/examples/pylab_examples/figure_title.py b/examples/pylab_examples/figure_title.py index 7591cadde6df..f9e96785ce70 100644 --- a/examples/pylab_examples/figure_title.py +++ b/examples/pylab_examples/figure_title.py @@ -27,4 +27,3 @@ def f(t): ylabel('Undamped') show() - diff --git a/examples/pylab_examples/finance_work2.py b/examples/pylab_examples/finance_work2.py index 0d68d999da5b..3e3349cb2c6e 100644 --- a/examples/pylab_examples/finance_work2.py +++ b/examples/pylab_examples/finance_work2.py @@ -204,5 +204,3 @@ def __call__(self, *args, **kwargs): ax3.yaxis.set_major_locator(MyLocator(5, prune='both')) plt.show() - - diff --git a/examples/pylab_examples/hexbin_demo2.py b/examples/pylab_examples/hexbin_demo2.py index 8f6a0c5ac265..b86617d2077f 100644 --- a/examples/pylab_examples/hexbin_demo2.py +++ b/examples/pylab_examples/hexbin_demo2.py @@ -53,4 +53,3 @@ cb.set_label('N observations') plt.show() - diff --git a/examples/pylab_examples/hyperlinks.py b/examples/pylab_examples/hyperlinks.py index 87df4301fbc4..3fbe182509c2 100644 --- a/examples/pylab_examples/hyperlinks.py +++ b/examples/pylab_examples/hyperlinks.py @@ -30,4 +30,3 @@ im.set_url('http://www.google.com') f.canvas.print_figure('image.svg') - diff --git a/examples/pylab_examples/image_clip_path.py b/examples/pylab_examples/image_clip_path.py index 64d4354e7ce6..0ed82f25986a 100755 --- a/examples/pylab_examples/image_clip_path.py +++ b/examples/pylab_examples/image_clip_path.py @@ -23,4 +23,3 @@ im.set_clip_path(patch) plt.show() - diff --git a/examples/pylab_examples/image_demo.py b/examples/pylab_examples/image_demo.py index f931b910457e..e3e3f6c1e629 100644 --- a/examples/pylab_examples/image_demo.py +++ b/examples/pylab_examples/image_demo.py @@ -16,4 +16,3 @@ vmax=abs(Z).max(), vmin=-abs(Z).max()) plt.show() - diff --git a/examples/pylab_examples/image_masked.py b/examples/pylab_examples/image_masked.py index 0a5e25995315..ed22867b22ff 100644 --- a/examples/pylab_examples/image_masked.py +++ b/examples/pylab_examples/image_masked.py @@ -52,4 +52,3 @@ orientation='horizontal', shrink=0.8) show() - diff --git a/examples/pylab_examples/interp_demo.py b/examples/pylab_examples/interp_demo.py index 911781f07d3d..1d2e38e450c5 100644 --- a/examples/pylab_examples/interp_demo.py +++ b/examples/pylab_examples/interp_demo.py @@ -10,4 +10,3 @@ fig, ax = plt.subplots() ax.plot(x,y,'ro',xi,yi,'-b.') plt.show() - diff --git a/examples/pylab_examples/layer_images.py b/examples/pylab_examples/layer_images.py index f85b8f5075b1..79b38d9c26bc 100644 --- a/examples/pylab_examples/layer_images.py +++ b/examples/pylab_examples/layer_images.py @@ -40,5 +40,3 @@ def func3(x,y): #axis([xmin, xmax, ymin, ymax]) show() - - diff --git a/examples/pylab_examples/legend_demo2.py b/examples/pylab_examples/legend_demo2.py index 34ea2b69ee4d..322759f583c1 100644 --- a/examples/pylab_examples/legend_demo2.py +++ b/examples/pylab_examples/legend_demo2.py @@ -18,6 +18,3 @@ plt.ylabel('volts') plt.title('Damped oscillation') plt.show() - - - diff --git a/examples/pylab_examples/line_collection.py b/examples/pylab_examples/line_collection.py index 716d6d4a4c7c..08cd019213cf 100644 --- a/examples/pylab_examples/line_collection.py +++ b/examples/pylab_examples/line_collection.py @@ -38,5 +38,3 @@ ax.add_collection(line_segments) ax.set_title('Line collection with masked arrays') plt.show() - - diff --git a/examples/pylab_examples/log_bar.py b/examples/pylab_examples/log_bar.py index feabfaed0b44..9baded3f58f9 100644 --- a/examples/pylab_examples/log_bar.py +++ b/examples/pylab_examples/log_bar.py @@ -21,5 +21,3 @@ pylab.gca().set_ylim( (0.001,1000)) pylab.show() - - diff --git a/examples/pylab_examples/mathtext_demo.py b/examples/pylab_examples/mathtext_demo.py index 232e5df1fc76..2947672e255c 100644 --- a/examples/pylab_examples/mathtext_demo.py +++ b/examples/pylab_examples/mathtext_demo.py @@ -26,4 +26,3 @@ show() - diff --git a/examples/pylab_examples/matplotlib_icon.py b/examples/pylab_examples/matplotlib_icon.py index 7df622ac1cb4..4ae060362d24 100644 --- a/examples/pylab_examples/matplotlib_icon.py +++ b/examples/pylab_examples/matplotlib_icon.py @@ -18,4 +18,3 @@ # grid(True) setp(gca(), xticklabels=[], yticklabels=[]) savefig('matplotlib', facecolor='0.75') - diff --git a/examples/pylab_examples/multi_image.py b/examples/pylab_examples/multi_image.py index 6dc23be2010a..3388c29d735b 100644 --- a/examples/pylab_examples/multi_image.py +++ b/examples/pylab_examples/multi_image.py @@ -78,9 +78,3 @@ def __call__(self, leader): sci(images[0]) # because the current image must be in current axes. show() - - - - - - diff --git a/examples/pylab_examples/multiline.py b/examples/pylab_examples/multiline.py index 0a52c726253b..9c918c348f56 100644 --- a/examples/pylab_examples/multiline.py +++ b/examples/pylab_examples/multiline.py @@ -20,7 +20,7 @@ grid(True) subplot(122) - + text(0.29, 0.7, "Mat\nTTp\n123", size=18, va="baseline", ha="right", multialignment="left", bbox=dict(fc="none")) @@ -35,7 +35,7 @@ xticks([0.2, 0.4, 0.6, 0.8, 1.], ["Jan\n2009","Feb\n2009","Mar\n2009", "Apr\n2009", "May\n2009"]) - + axhline(0.7) title("test line spacing for multiline text") diff --git a/examples/pylab_examples/pcolor_log.py b/examples/pylab_examples/pcolor_log.py index 84f831bca17e..bf497f468d85 100644 --- a/examples/pylab_examples/pcolor_log.py +++ b/examples/pylab_examples/pcolor_log.py @@ -22,4 +22,3 @@ plt.show() - diff --git a/examples/pylab_examples/plotfile_demo.py b/examples/pylab_examples/plotfile_demo.py index 04b94665c167..1a0e455e714f 100644 --- a/examples/pylab_examples/plotfile_demo.py +++ b/examples/pylab_examples/plotfile_demo.py @@ -33,5 +33,3 @@ plotfile(fname, (0,5,6), plotfuncs={5:'bar'}) show() - - diff --git a/examples/pylab_examples/pstest.py b/examples/pylab_examples/pstest.py index 909e29de0176..bd78b558c658 100644 --- a/examples/pylab_examples/pstest.py +++ b/examples/pylab_examples/pstest.py @@ -28,4 +28,3 @@ def f(t): xlabel('time (s)', fontsize=12) show() - diff --git a/examples/pylab_examples/quiver_demo.py b/examples/pylab_examples/quiver_demo.py index f8c28d96c5f3..95173a35cd71 100644 --- a/examples/pylab_examples/quiver_demo.py +++ b/examples/pylab_examples/quiver_demo.py @@ -81,4 +81,3 @@ show() - diff --git a/examples/pylab_examples/step_demo.py b/examples/pylab_examples/step_demo.py index a6cae14abeb2..439c44d99334 100644 --- a/examples/pylab_examples/step_demo.py +++ b/examples/pylab_examples/step_demo.py @@ -23,4 +23,3 @@ ylim(-0.5, 4) show() - diff --git a/examples/pylab_examples/system_monitor.py b/examples/pylab_examples/system_monitor.py index 30add8d05884..cd57d435e3be 100644 --- a/examples/pylab_examples/system_monitor.py +++ b/examples/pylab_examples/system_monitor.py @@ -49,8 +49,3 @@ def get_stats(): ax.set_ylim([0,100]) draw() - - - - - diff --git a/examples/pylab_examples/transoffset.py b/examples/pylab_examples/transoffset.py index 42b4db17a598..871eec703858 100644 --- a/examples/pylab_examples/transoffset.py +++ b/examples/pylab_examples/transoffset.py @@ -54,4 +54,3 @@ P.show() - diff --git a/examples/pylab_examples/usetex_baseline_test.py b/examples/pylab_examples/usetex_baseline_test.py index 9ab0783ad0c5..5cbb6364b244 100644 --- a/examples/pylab_examples/usetex_baseline_test.py +++ b/examples/pylab_examples/usetex_baseline_test.py @@ -75,4 +75,3 @@ def test_window_extent(ax, usetex, preview): plt.draw() plt.show() - diff --git a/examples/pylab_examples/xcorr_demo.py b/examples/pylab_examples/xcorr_demo.py index d21357137b5a..4cacb00e3465 100644 --- a/examples/pylab_examples/xcorr_demo.py +++ b/examples/pylab_examples/xcorr_demo.py @@ -14,4 +14,3 @@ ax2.axhline(0, color='black', lw=2) plt.show() - diff --git a/examples/specialty_plots/hinton_demo.py b/examples/specialty_plots/hinton_demo.py index 201b321283c1..3839004a7ce0 100644 --- a/examples/specialty_plots/hinton_demo.py +++ b/examples/specialty_plots/hinton_demo.py @@ -38,4 +38,3 @@ def hinton(matrix, max_weight=None, ax=None): if __name__ == '__main__': hinton(np.random.rand(20, 20) - 0.5) plt.show() - diff --git a/examples/statistics/errorbar_demo.py b/examples/statistics/errorbar_demo.py index 4801f46a8218..d970e62d8441 100644 --- a/examples/statistics/errorbar_demo.py +++ b/examples/statistics/errorbar_demo.py @@ -10,4 +10,3 @@ plt.errorbar(x, y, xerr=0.2, yerr=0.4) plt.show() - diff --git a/examples/statistics/errorbar_demo_features.py b/examples/statistics/errorbar_demo_features.py index 2252d1fb4a8c..4ec7a68ed437 100644 --- a/examples/statistics/errorbar_demo_features.py +++ b/examples/statistics/errorbar_demo_features.py @@ -36,4 +36,3 @@ ax1.set_title('variable, asymmetric error') ax1.set_yscale('log') plt.show() - diff --git a/examples/statistics/errorbar_limits.py b/examples/statistics/errorbar_limits.py index ae335e9deab0..f09f71517e79 100644 --- a/examples/statistics/errorbar_limits.py +++ b/examples/statistics/errorbar_limits.py @@ -50,4 +50,3 @@ ax.set_xlim((0, 5.5)) ax.set_title('Errorbar upper and lower limits') plt.show() - diff --git a/examples/units/annotate_with_units.py b/examples/units/annotate_with_units.py index 19a99c3b2187..af42e5878fc5 100644 --- a/examples/units/annotate_with_units.py +++ b/examples/units/annotate_with_units.py @@ -21,4 +21,3 @@ ax.set_xlim(0*cm, 4*cm) ax.set_ylim(0*cm, 4*cm) plt.show() - diff --git a/examples/units/artist_tests.py b/examples/units/artist_tests.py index 38a699d208db..83d0798c5f7f 100644 --- a/examples/units/artist_tests.py +++ b/examples/units/artist_tests.py @@ -50,4 +50,3 @@ ax.grid(True) ax.set_title("Artists with units") plt.show() - diff --git a/examples/units/units_scatter.py b/examples/units/units_scatter.py index 41d2541e9484..77ed1c515ed3 100644 --- a/examples/units/units_scatter.py +++ b/examples/units/units_scatter.py @@ -34,4 +34,3 @@ ax3.axis([0,10,0,1]) show() - diff --git a/examples/user_interfaces/embedding_in_gtk3.py b/examples/user_interfaces/embedding_in_gtk3.py index 5b24db1857fa..54d39869242b 100755 --- a/examples/user_interfaces/embedding_in_gtk3.py +++ b/examples/user_interfaces/embedding_in_gtk3.py @@ -32,4 +32,3 @@ win.show_all() Gtk.main() - diff --git a/examples/user_interfaces/embedding_in_gtk3_panzoom.py b/examples/user_interfaces/embedding_in_gtk3_panzoom.py index d576974656d1..e189b1263d8f 100644 --- a/examples/user_interfaces/embedding_in_gtk3_panzoom.py +++ b/examples/user_interfaces/embedding_in_gtk3_panzoom.py @@ -34,4 +34,3 @@ win.show_all() Gtk.main() - diff --git a/examples/user_interfaces/embedding_in_tk.py b/examples/user_interfaces/embedding_in_tk.py index 0586c58a38c8..00d814cbacab 100755 --- a/examples/user_interfaces/embedding_in_tk.py +++ b/examples/user_interfaces/embedding_in_tk.py @@ -57,5 +57,3 @@ def _quit(): Tk.mainloop() # If you put root.destroy() here, it will cause an error if # the window is closed with the window manager. - - diff --git a/examples/user_interfaces/embedding_in_wx3.py b/examples/user_interfaces/embedding_in_wx3.py index 622c5543b25d..3ed6c063c912 100755 --- a/examples/user_interfaces/embedding_in_wx3.py +++ b/examples/user_interfaces/embedding_in_wx3.py @@ -160,4 +160,3 @@ def OnBang(self,event): if __name__ == '__main__': app = MyApp(0) app.MainLoop() - diff --git a/examples/user_interfaces/embedding_in_wx5.py b/examples/user_interfaces/embedding_in_wx5.py index e5d0a4ba456e..60a0a8994719 100644 --- a/examples/user_interfaces/embedding_in_wx5.py +++ b/examples/user_interfaces/embedding_in_wx5.py @@ -51,4 +51,3 @@ def demo(): app.MainLoop() if __name__ == "__main__": demo() - diff --git a/examples/user_interfaces/fourier_demo_wx.py b/examples/user_interfaces/fourier_demo_wx.py index 75f46b803d9c..e60e8d90df23 100644 --- a/examples/user_interfaces/fourier_demo_wx.py +++ b/examples/user_interfaces/fourier_demo_wx.py @@ -41,10 +41,10 @@ def __init__(self, initialValue=None, minimum=0., maximum=1.): raise ValueError('illegal initial value') self.value = initialValue self.knobs = [] - + def attach(self, knob): self.knobs += [knob] - + def set(self, value, knob=None): self.value = value self.value = self.constrain(value) @@ -68,7 +68,7 @@ def __init__(self, parent, label, param): self.slider = wx.Slider(parent, -1) self.slider.SetMax(param.maximum*1000) self.setKnob(param.value) - + sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(self.sliderLabel, 0, wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=2) sizer.Add(self.sliderText, 0, wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=2) @@ -84,11 +84,11 @@ def __init__(self, parent, label, param): def sliderHandler(self, evt): value = evt.GetInt() / 1000. self.param.set(value) - + def sliderTextHandler(self, evt): value = float(self.sliderText.GetValue()) self.param.set(value) - + def setKnob(self, value): self.sliderText.SetValue('%g'%value) self.slider.SetValue(value*1000) @@ -111,7 +111,7 @@ def __init__(self, *args, **kwargs): sizer.Add(self.amplitudeSliderGroup.sizer, 0, \ wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5) self.SetSizer(sizer) - + class FourierDemoWindow(wx.Window, Knob): def __init__(self, *args, **kwargs): @@ -127,7 +127,7 @@ def __init__(self, *args, **kwargs): self.f0 = Param(2., minimum=0., maximum=6.) self.A = Param(1., minimum=0.01, maximum=2.) self.draw() - + # Not sure I like having two params attached to the same Knob, # but that is what we have here... it works but feels kludgy - # although maybe it's not too bad since the knob changes both params @@ -135,10 +135,10 @@ def __init__(self, *args, **kwargs): self.f0.attach(self) self.A.attach(self) self.Bind(wx.EVT_SIZE, self.sizeHandler) - + def sizeHandler(self, *args, **kwargs): self.canvas.SetSize(self.GetSize()) - + def mouseDown(self, evt): if self.lines[0] in self.figure.hitlist(evt): self.state = 'frequency' @@ -161,7 +161,7 @@ def mouseMotion(self, evt): elif self.state == 'time': if (x-x0)/x0 != -1.: self.f0.set(1./(1./f0Init+(1./f0Init*(x-x0)/x0))) - + def mouseUp(self, evt): self.state = '' @@ -211,6 +211,6 @@ def OnInit(self): self.frame1 = FourierDemoFrame(parent=None, title="Fourier Demo", size=(640, 480)) self.frame1.Show() return True - + app = App() app.MainLoop() diff --git a/examples/user_interfaces/histogram_demo_canvasagg.py b/examples/user_interfaces/histogram_demo_canvasagg.py index 3f99c3d1f42e..d3444e8c9dd6 100644 --- a/examples/user_interfaces/histogram_demo_canvasagg.py +++ b/examples/user_interfaces/histogram_demo_canvasagg.py @@ -57,6 +57,3 @@ from PIL import Image im = Image.fromstring( "RGB", (w,h), s) im.show() - - - diff --git a/examples/user_interfaces/lineprops_dialog_gtk.py b/examples/user_interfaces/lineprops_dialog_gtk.py index 211aa98d49e8..13a1a589090f 100644 --- a/examples/user_interfaces/lineprops_dialog_gtk.py +++ b/examples/user_interfaces/lineprops_dialog_gtk.py @@ -22,4 +22,3 @@ def f(t): dlg = DialogLineprops([l1,l2]) dlg.show() plt.show() - diff --git a/examples/user_interfaces/mathtext_wx.py b/examples/user_interfaces/mathtext_wx.py index 2fc64a561a36..ce3332456993 100644 --- a/examples/user_interfaces/mathtext_wx.py +++ b/examples/user_interfaces/mathtext_wx.py @@ -125,4 +125,3 @@ def OnInit(self): app = MyApp() app.MainLoop() - diff --git a/examples/user_interfaces/svg_histogram.py b/examples/user_interfaces/svg_histogram.py index f498f62080a2..da731b15e365 100755 --- a/examples/user_interfaces/svg_histogram.py +++ b/examples/user_interfaces/svg_histogram.py @@ -74,7 +74,7 @@ # Set ids for the text patches for i, t in enumerate(leg.get_texts()): t.set_gid('leg_text_%d'%i) - + # Save SVG in a fake file object. f = StringIO() plt.savefig(f, format="svg") @@ -90,13 +90,13 @@ el = xmlid['leg_patch_%d'%i] el.set('cursor', 'pointer') el.set('onclick', "toggle_hist(this)") - + # Add attributes to the text objects. for i, t in enumerate(leg.get_texts()): el = xmlid['leg_text_%d'%i] el.set('cursor', 'pointer') el.set('onclick', "toggle_hist(this)") - + # Create script defining the function `toggle_hist`. # We create a global variable `container` that stores the patches id # belonging to each histogram. Then a function "toggle_element" sets the @@ -147,11 +147,8 @@ # Add a transition effect css = tree.getchildren()[0][0] css.text = css.text + "g {-webkit-transition:opacity 0.4s ease-out;-moz-transition:opacity 0.4s ease-out;}" - + # Insert the script and save to file. tree.insert(0, ET.XML(script)) ET.ElementTree(tree).write("svg_histogram.svg") - - - diff --git a/examples/user_interfaces/svg_tooltip.py b/examples/user_interfaces/svg_tooltip.py index 6ec48307b4ab..632a7a3b6ffb 100644 --- a/examples/user_interfaces/svg_tooltip.py +++ b/examples/user_interfaces/svg_tooltip.py @@ -46,7 +46,7 @@ ha='left', bbox=dict(boxstyle='round,pad=.5', fc=(.1,.1,.1,.92), ec=(1.,1.,1.), lw=1, zorder=1), ) - + rect_tip = ax.annotate('This is a green rectangle.', xy=(-5,10), xytext=(30,40), @@ -55,7 +55,7 @@ ha='left', bbox=dict(boxstyle='round,pad=.5', fc=(.1,.1,.1,.92), ec=(1.,1.,1.), lw=1, zorder=1), ) - + # Set id for the patches for i, t in enumerate(ax.patches): diff --git a/examples/widgets/buttons.py b/examples/widgets/buttons.py index 6bb7b0bc2580..54c42a3808da 100644 --- a/examples/widgets/buttons.py +++ b/examples/widgets/buttons.py @@ -38,4 +38,3 @@ def prev(self, event): bprev.on_clicked(callback.prev) plt.show() -