diff --git a/examples/animation/dynamic_image.py b/examples/animation/dynamic_image.py index fd07c36e7bb4..3dc220254600 100644 --- a/examples/animation/dynamic_image.py +++ b/examples/animation/dynamic_image.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ An animated image """ diff --git a/examples/animation/dynamic_image2.py b/examples/animation/dynamic_image2.py index b15723081020..ca6a48af7588 100644 --- a/examples/animation/dynamic_image2.py +++ b/examples/animation/dynamic_image2.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ An animated image """ diff --git a/examples/api/agg_oo.py b/examples/api/agg_oo.py index 76fb7665fa54..cf42a2a0a82c 100644 --- a/examples/api/agg_oo.py +++ b/examples/api/agg_oo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- noplot -*- """ A pure OO (look Ma, no pylab!) example using the agg backend diff --git a/examples/api/barchart_demo.py b/examples/api/barchart_demo.py index eceb5dc3aa09..be6b6e24fbb4 100644 --- a/examples/api/barchart_demo.py +++ b/examples/api/barchart_demo.py @@ -1,5 +1,3 @@ - -#!/usr/bin/env python # a bar plot with errorbars import numpy as np import matplotlib.pyplot as plt diff --git a/examples/api/collections_demo.py b/examples/api/collections_demo.py index beab1edb2981..6d58b180855a 100644 --- a/examples/api/collections_demo.py +++ b/examples/api/collections_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python '''Demonstration of LineCollection, PolyCollection, and RegularPolyCollection with autoscaling. diff --git a/examples/api/date_demo.py b/examples/api/date_demo.py index 7e419bb9ee44..96202c465c5f 100644 --- a/examples/api/date_demo.py +++ b/examples/api/date_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Show how to make date plots in matplotlib using date tick locators and formatters. See major_minor_demo1.py for more information on diff --git a/examples/api/joinstyle.py b/examples/api/joinstyle.py index f0a8a252ff22..24544e19cff2 100644 --- a/examples/api/joinstyle.py +++ b/examples/api/joinstyle.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Illustrate the three different join styles """ diff --git a/examples/api/power_norm_demo.py b/examples/api/power_norm_demo.py index 76ada2370df3..a26431f27f22 100755 --- a/examples/api/power_norm_demo.py +++ b/examples/api/power_norm_demo.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - from matplotlib import pyplot as plt import matplotlib.colors as mcolors import numpy as np diff --git a/examples/api/sankey_demo_old.py b/examples/api/sankey_demo_old.py index fe4d924f774b..7bf01b690a3a 100755 --- a/examples/api/sankey_demo_old.py +++ b/examples/api/sankey_demo_old.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import print_function __author__ = "Yannick Copin " diff --git a/examples/api/two_scales.py b/examples/api/two_scales.py index 5ff253d44954..8f960b3e95c8 100644 --- a/examples/api/two_scales.py +++ b/examples/api/two_scales.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Demonstrate how to do two plots on the same axes with different left diff --git a/examples/event_handling/keypress_demo.py b/examples/event_handling/keypress_demo.py index 0cf66313fb16..30ac00e4efbe 100755 --- a/examples/event_handling/keypress_demo.py +++ b/examples/event_handling/keypress_demo.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - """ Show how to connect to keypress events """ diff --git a/examples/event_handling/pick_event_demo.py b/examples/event_handling/pick_event_demo.py index bb3f7751901f..e6282da88afb 100755 --- a/examples/event_handling/pick_event_demo.py +++ b/examples/event_handling/pick_event_demo.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - """ You can enable picking by setting the "picker" property of an artist diff --git a/examples/event_handling/pipong.py b/examples/event_handling/pipong.py index 770db720ff61..89ab36ef9b36 100755 --- a/examples/event_handling/pipong.py +++ b/examples/event_handling/pipong.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # A matplotlib based game of Pong illustrating one way to write interactive # animation which are easily ported to multiple backends # pipong.py was written by Paul Ivanov diff --git a/examples/event_handling/pong_gtk.py b/examples/event_handling/pong_gtk.py index f522f28b7fd2..48290a1b9046 100755 --- a/examples/event_handling/pong_gtk.py +++ b/examples/event_handling/pong_gtk.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import print_function # For detailed comments on animation and the techniques used here, see diff --git a/examples/event_handling/test_mouseclicks.py b/examples/event_handling/test_mouseclicks.py index 506ee5b1cd7b..3415f412633b 100755 --- a/examples/event_handling/test_mouseclicks.py +++ b/examples/event_handling/test_mouseclicks.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python from __future__ import print_function import matplotlib diff --git a/examples/misc/ftface_props.py b/examples/misc/ftface_props.py index 417ee8192f56..c39ca5d69814 100755 --- a/examples/misc/ftface_props.py +++ b/examples/misc/ftface_props.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import print_function """ This is a demo script to show you how to use all the properties of an diff --git a/examples/pylab_examples/accented_text.py b/examples/pylab_examples/accented_text.py index 2107ea8ff52e..1902ad71b480 100644 --- a/examples/pylab_examples/accented_text.py +++ b/examples/pylab_examples/accented_text.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ matplotlib supports accented characters via TeX mathtext diff --git a/examples/pylab_examples/agg_buffer.py b/examples/pylab_examples/agg_buffer.py index 1293c723cb8c..cf7042793ba0 100755 --- a/examples/pylab_examples/agg_buffer.py +++ b/examples/pylab_examples/agg_buffer.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Use backend agg to access the figure canvas as an RGB string and then convert it to an array and pass it to Pillow for rendering. diff --git a/examples/pylab_examples/alignment_test.py b/examples/pylab_examples/alignment_test.py index 3173a9c97a71..5de0d6a33a48 100644 --- a/examples/pylab_examples/alignment_test.py +++ b/examples/pylab_examples/alignment_test.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ You can precisely layout text in data or axes (0,1) coordinates. This example shows you some of the alignment and rotation specifications to diff --git a/examples/pylab_examples/anscombe.py b/examples/pylab_examples/anscombe.py index 3392bc55fd5e..0c043af34ce4 100755 --- a/examples/pylab_examples/anscombe.py +++ b/examples/pylab_examples/anscombe.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import print_function """ Edward Tufte uses this example from Anscombe to show 4 datasets of x diff --git a/examples/pylab_examples/arrow_demo.py b/examples/pylab_examples/arrow_demo.py index 312447e05fe8..73781f5f1e65 100644 --- a/examples/pylab_examples/arrow_demo.py +++ b/examples/pylab_examples/arrow_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """Arrow drawing example for the new fancy_arrow facilities. Code contributed by: Rob Knight diff --git a/examples/pylab_examples/bar_stacked.py b/examples/pylab_examples/bar_stacked.py index daa84345fea4..d2fb3b94841b 100755 --- a/examples/pylab_examples/bar_stacked.py +++ b/examples/pylab_examples/bar_stacked.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # a stacked bar plot with errorbars import numpy as np import matplotlib.pyplot as plt diff --git a/examples/pylab_examples/cohere_demo.py b/examples/pylab_examples/cohere_demo.py index b7a39a18ceba..854aeb46877b 100644 --- a/examples/pylab_examples/cohere_demo.py +++ b/examples/pylab_examples/cohere_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Compute the coherence of two signals """ diff --git a/examples/pylab_examples/color_demo.py b/examples/pylab_examples/color_demo.py index 1d471b0086a9..8dacb6653b8c 100755 --- a/examples/pylab_examples/color_demo.py +++ b/examples/pylab_examples/color_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ matplotlib gives you 4 ways to specify colors, diff --git a/examples/pylab_examples/colours.py b/examples/pylab_examples/colours.py index 4694fa4f09d9..b34d6a6d97e6 100644 --- a/examples/pylab_examples/colours.py +++ b/examples/pylab_examples/colours.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- noplot -*- """ Some simple functions to generate colours. diff --git a/examples/pylab_examples/contour_corner_mask.py b/examples/pylab_examples/contour_corner_mask.py index f7211beca926..7be99f7182ee 100644 --- a/examples/pylab_examples/contour_corner_mask.py +++ b/examples/pylab_examples/contour_corner_mask.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Illustrate the difference between corner_mask=False and corner_mask=True for masked contour plots. diff --git a/examples/pylab_examples/contour_demo.py b/examples/pylab_examples/contour_demo.py index 5e313bfa24be..b3555b1de1eb 100755 --- a/examples/pylab_examples/contour_demo.py +++ b/examples/pylab_examples/contour_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Illustrate simple contour plotting, contours on an image with a colorbar for the contours, and labelled contours. diff --git a/examples/pylab_examples/contour_image.py b/examples/pylab_examples/contour_image.py index a972db65940e..71b853c154cd 100755 --- a/examples/pylab_examples/contour_image.py +++ b/examples/pylab_examples/contour_image.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python ''' Test combinations of contouring, filled contouring, and image plotting. For contour labelling, see contour_demo.py. diff --git a/examples/pylab_examples/contour_label_demo.py b/examples/pylab_examples/contour_label_demo.py index 42eb8f579406..fe0cf87cb563 100644 --- a/examples/pylab_examples/contour_label_demo.py +++ b/examples/pylab_examples/contour_label_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Illustrate some of the more advanced things that one can do with contour labels. diff --git a/examples/pylab_examples/contourf_demo.py b/examples/pylab_examples/contourf_demo.py index 5b9a5b41e071..21448f99d7d6 100755 --- a/examples/pylab_examples/contourf_demo.py +++ b/examples/pylab_examples/contourf_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt diff --git a/examples/pylab_examples/coords_demo.py b/examples/pylab_examples/coords_demo.py index 71f863ac034f..7945e87b21cd 100755 --- a/examples/pylab_examples/coords_demo.py +++ b/examples/pylab_examples/coords_demo.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - """ An example of how to interact with the plotting canvas by connecting to move and click events diff --git a/examples/pylab_examples/coords_report.py b/examples/pylab_examples/coords_report.py index 4d47774e0e22..cdc0d445a43e 100644 --- a/examples/pylab_examples/coords_report.py +++ b/examples/pylab_examples/coords_report.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # override the default reporting of coords import matplotlib.pyplot as plt diff --git a/examples/pylab_examples/csd_demo.py b/examples/pylab_examples/csd_demo.py index c988e2c1aa69..fc925a67028e 100644 --- a/examples/pylab_examples/csd_demo.py +++ b/examples/pylab_examples/csd_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Compute the cross spectral density of two signals """ diff --git a/examples/pylab_examples/custom_cmap.py b/examples/pylab_examples/custom_cmap.py index 180996cd1c56..24550a18d724 100644 --- a/examples/pylab_examples/custom_cmap.py +++ b/examples/pylab_examples/custom_cmap.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap diff --git a/examples/pylab_examples/custom_ticker1.py b/examples/pylab_examples/custom_ticker1.py index c4aa02bc5496..dfd0fc847ff7 100755 --- a/examples/pylab_examples/custom_ticker1.py +++ b/examples/pylab_examples/custom_ticker1.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - """ The new ticker code was designed to explicitly support user customized ticking. The documentation diff --git a/examples/pylab_examples/data_helper.py b/examples/pylab_examples/data_helper.py index 27a9cef06dda..f10b804b9745 100755 --- a/examples/pylab_examples/data_helper.py +++ b/examples/pylab_examples/data_helper.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Some functions to load a return data for the plot demos from numpy import fromstring, argsort, take, array, resize diff --git a/examples/pylab_examples/date_demo1.py b/examples/pylab_examples/date_demo1.py index 45fbf128840e..87b1d658981a 100644 --- a/examples/pylab_examples/date_demo1.py +++ b/examples/pylab_examples/date_demo1.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Show how to make date plots in matplotlib using date tick locators and formatters. See major_minor_demo1.py for more information on diff --git a/examples/pylab_examples/date_demo2.py b/examples/pylab_examples/date_demo2.py index 2457c9f824cc..e7a5c270399e 100755 --- a/examples/pylab_examples/date_demo2.py +++ b/examples/pylab_examples/date_demo2.py @@ -1,10 +1,9 @@ -#!/usr/bin/env python - """ Show how to make date plots in matplotlib using date tick locators and formatters. See major_minor_demo1.py for more information on controlling major and minor ticks """ + from __future__ import print_function import datetime import matplotlib.pyplot as plt diff --git a/examples/pylab_examples/date_demo_convert.py b/examples/pylab_examples/date_demo_convert.py index 693a6752a3ca..2bf07a631ae4 100644 --- a/examples/pylab_examples/date_demo_convert.py +++ b/examples/pylab_examples/date_demo_convert.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import datetime import matplotlib.pyplot as plt from matplotlib.dates import DayLocator, HourLocator, DateFormatter, drange diff --git a/examples/pylab_examples/date_demo_rrule.py b/examples/pylab_examples/date_demo_rrule.py index e48db31f2d7b..77cb4e9e9949 100644 --- a/examples/pylab_examples/date_demo_rrule.py +++ b/examples/pylab_examples/date_demo_rrule.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Show how to use an rrule instance to make a custom date ticker - here we put a tick mark on every 5th easter diff --git a/examples/pylab_examples/equal_aspect_ratio.py b/examples/pylab_examples/equal_aspect_ratio.py index b40aebe2f126..9ed478095e6d 100755 --- a/examples/pylab_examples/equal_aspect_ratio.py +++ b/examples/pylab_examples/equal_aspect_ratio.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Example: simple line plot. Show how to make a plot that has equal aspect ratio diff --git a/examples/pylab_examples/eventcollection_demo.py b/examples/pylab_examples/eventcollection_demo.py index 3510a70479ae..96d389baff05 100644 --- a/examples/pylab_examples/eventcollection_demo.py +++ b/examples/pylab_examples/eventcollection_demo.py @@ -1,7 +1,7 @@ -#!/usr/bin/env python -# -*- Coding:utf-8 -*- -'''Plot two curves, then use EventCollections to mark the locations of the x -and y data points on the respective axes for each curve''' +''' +Plot two curves, then use EventCollections to mark the locations of the x +and y data points on the respective axes for each curve +''' import matplotlib.pyplot as plt from matplotlib.collections import EventCollection diff --git a/examples/pylab_examples/eventplot_demo.py b/examples/pylab_examples/eventplot_demo.py index 8f58d24ec66d..dd6d8fa1c48f 100755 --- a/examples/pylab_examples/eventplot_demo.py +++ b/examples/pylab_examples/eventplot_demo.py @@ -1,7 +1,7 @@ -#!/usr/bin/env python -# -*- Coding:utf-8 -*- -'''an eventplot showing sequences of events with various line properties -the plot is shown in both horizontal and vertical orientations''' +''' +An eventplot showing sequences of events with various line properties. +The plot is shown in both horizontal and vertical orientations. +''' import matplotlib.pyplot as plt import numpy as np diff --git a/examples/pylab_examples/fill_between_demo.py b/examples/pylab_examples/fill_between_demo.py index df0f0c2894ad..b3653e456ce5 100644 --- a/examples/pylab_examples/fill_between_demo.py +++ b/examples/pylab_examples/fill_between_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import matplotlib.pyplot as plt import numpy as np diff --git a/examples/pylab_examples/finance_demo.py b/examples/pylab_examples/finance_demo.py index c1cc76870fb9..94f1a3c1b467 100644 --- a/examples/pylab_examples/finance_demo.py +++ b/examples/pylab_examples/finance_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import matplotlib.pyplot as plt from matplotlib.dates import DateFormatter, WeekdayLocator,\ DayLocator, MONDAY diff --git a/examples/pylab_examples/ginput_manual_clabel.py b/examples/pylab_examples/ginput_manual_clabel.py index ff7d2b2b0e89..9cbf85cbde9b 100755 --- a/examples/pylab_examples/ginput_manual_clabel.py +++ b/examples/pylab_examples/ginput_manual_clabel.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- noplot -*- from __future__ import print_function diff --git a/examples/pylab_examples/hyperlinks.py b/examples/pylab_examples/hyperlinks.py index e8f0b674052b..599f637b88f7 100644 --- a/examples/pylab_examples/hyperlinks.py +++ b/examples/pylab_examples/hyperlinks.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- noplot -*- """ diff --git a/examples/pylab_examples/image_clip_path.py b/examples/pylab_examples/image_clip_path.py index db1478af968d..fbcb0870d75c 100755 --- a/examples/pylab_examples/image_clip_path.py +++ b/examples/pylab_examples/image_clip_path.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import numpy as np import matplotlib.cm as cm import matplotlib.mlab as mlab diff --git a/examples/pylab_examples/image_demo.py b/examples/pylab_examples/image_demo.py index 792a9a8f8373..a189ef2ce3eb 100644 --- a/examples/pylab_examples/image_demo.py +++ b/examples/pylab_examples/image_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import numpy as np import matplotlib.cm as cm import matplotlib.mlab as mlab diff --git a/examples/pylab_examples/leftventricle_bulleye.py b/examples/pylab_examples/leftventricle_bulleye.py index 35a1f88ee15d..e96a4cc8e7f8 100644 --- a/examples/pylab_examples/leftventricle_bulleye.py +++ b/examples/pylab_examples/leftventricle_bulleye.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ This example demonstrates how to create the 17 segment model for the left ventricle recommended by the American Heart Association (AHA). diff --git a/examples/pylab_examples/major_minor_demo2.py b/examples/pylab_examples/major_minor_demo2.py index 0189ae46270f..1bdfefabdb94 100644 --- a/examples/pylab_examples/major_minor_demo2.py +++ b/examples/pylab_examples/major_minor_demo2.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Automatic tick selection for major and minor ticks. diff --git a/examples/pylab_examples/mathtext_demo.py b/examples/pylab_examples/mathtext_demo.py index 9de179b765c3..085d557cddd4 100755 --- a/examples/pylab_examples/mathtext_demo.py +++ b/examples/pylab_examples/mathtext_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Use matplotlib's internal LaTeX parser and layout engine. For true latex rendering, see the text.usetex option diff --git a/examples/pylab_examples/movie_demo.py b/examples/pylab_examples/movie_demo.py index 0d1f7d78666f..69d90646f6e0 100755 --- a/examples/pylab_examples/movie_demo.py +++ b/examples/pylab_examples/movie_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- noplot -*- from __future__ import print_function diff --git a/examples/pylab_examples/mri_with_eeg.py b/examples/pylab_examples/mri_with_eeg.py index 3a3760853aa0..e7f8c7f16937 100755 --- a/examples/pylab_examples/mri_with_eeg.py +++ b/examples/pylab_examples/mri_with_eeg.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python - """ This now uses the imshow command instead of pcolor which *is much faster* """ + from __future__ import division, print_function import numpy as np diff --git a/examples/pylab_examples/multi_image.py b/examples/pylab_examples/multi_image.py index dad829afec93..ebcfc8168448 100644 --- a/examples/pylab_examples/multi_image.py +++ b/examples/pylab_examples/multi_image.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python ''' Make a set of images with a single colormap, norm, and colorbar. diff --git a/examples/pylab_examples/multicolored_line.py b/examples/pylab_examples/multicolored_line.py index 78a8ef42f737..386cea0a438b 100644 --- a/examples/pylab_examples/multicolored_line.py +++ b/examples/pylab_examples/multicolored_line.py @@ -1,7 +1,7 @@ -#!/usr/bin/env python ''' Color parts of a line based on its properties, e.g., slope. ''' + import numpy as np import matplotlib.pyplot as plt from matplotlib.collections import LineCollection diff --git a/examples/pylab_examples/polar_legend.py b/examples/pylab_examples/polar_legend.py index 632f2e8bde0f..a249755c32b4 100755 --- a/examples/pylab_examples/polar_legend.py +++ b/examples/pylab_examples/polar_legend.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import numpy as np from matplotlib.pyplot import figure, show, rc diff --git a/examples/pylab_examples/quadmesh_demo.py b/examples/pylab_examples/quadmesh_demo.py index c7e1baa68862..8f6ab8ae189a 100755 --- a/examples/pylab_examples/quadmesh_demo.py +++ b/examples/pylab_examples/quadmesh_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ pcolormesh uses a QuadMesh, a faster generalization of pcolor, but with some restrictions. diff --git a/examples/pylab_examples/symlog_demo.py b/examples/pylab_examples/symlog_demo.py index 4c4a793abeb8..5cd196a47a2b 100755 --- a/examples/pylab_examples/symlog_demo.py +++ b/examples/pylab_examples/symlog_demo.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import matplotlib.pyplot as plt import numpy as np diff --git a/examples/pylab_examples/tex_unicode_demo.py b/examples/pylab_examples/tex_unicode_demo.py index fa9ad8da1203..4f5ed8da144c 100755 --- a/examples/pylab_examples/tex_unicode_demo.py +++ b/examples/pylab_examples/tex_unicode_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """ This demo is tex_demo.py modified to have unicode. See that file for diff --git a/examples/pylab_examples/text_handles.py b/examples/pylab_examples/text_handles.py index e37a82849aa9..ffaa782df8eb 100644 --- a/examples/pylab_examples/text_handles.py +++ b/examples/pylab_examples/text_handles.py @@ -1,9 +1,10 @@ -#!/usr/bin/env python -# Controlling the properties of axis text using handles +""" +Controlling the properties of axis text using handles -# See examples/text_themes.py for a more elegant, pythonic way to control -# fonts. After all, if we were slaves to MATLAB , we wouldn't be -# using python! +See examples/text_themes.py for a more elegant, pythonic way to control +fonts. After all, if we were slaves to MATLAB , we wouldn't be +using python! +""" import matplotlib.pyplot as plt import numpy as np diff --git a/examples/pylab_examples/text_rotation_relative_to_line.py b/examples/pylab_examples/text_rotation_relative_to_line.py index a34dbb9be366..d27897c6d4cc 100644 --- a/examples/pylab_examples/text_rotation_relative_to_line.py +++ b/examples/pylab_examples/text_rotation_relative_to_line.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Text objects in matplotlib are normally rotated with respect to the screen coordinate system (i.e., 45 degrees rotation plots text along a diff --git a/examples/pylab_examples/titles_demo.py b/examples/pylab_examples/titles_demo.py index ae132be59f9d..8d13811cd7e6 100644 --- a/examples/pylab_examples/titles_demo.py +++ b/examples/pylab_examples/titles_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ matplotlib can display plot titles centered, flush with the left side of a set of axes, and flush with the right side of a set of axes. diff --git a/examples/pylab_examples/toggle_images.py b/examples/pylab_examples/toggle_images.py index 3480b7474f11..3e7f7e6127e7 100644 --- a/examples/pylab_examples/toggle_images.py +++ b/examples/pylab_examples/toggle_images.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ toggle between two images by pressing "t" The basic idea is to load two images (they can be different shapes) and plot diff --git a/examples/pylab_examples/webapp_demo.py b/examples/pylab_examples/webapp_demo.py index e12f882ba854..654e1e8ebfa7 100644 --- a/examples/pylab_examples/webapp_demo.py +++ b/examples/pylab_examples/webapp_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- noplot -*- """ This example shows how to use the agg backend directly to create diff --git a/examples/pylab_examples/zorder_demo.py b/examples/pylab_examples/zorder_demo.py index 400cc060c784..f9c0ff4710c4 100755 --- a/examples/pylab_examples/zorder_demo.py +++ b/examples/pylab_examples/zorder_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ The default drawing order for axes is patches, lines, text. This order is determined by the zorder attribute. The following defaults diff --git a/examples/tests/backend_driver.py b/examples/tests/backend_driver.py index 8f2eddad61a9..5e462ff0df63 100755 --- a/examples/tests/backend_driver.py +++ b/examples/tests/backend_driver.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import print_function, division """ This is used to drive many of the examples across the backends, for diff --git a/examples/units/bar_unit_demo.py b/examples/units/bar_unit_demo.py index 76b639e1939a..86b2add9e28a 100644 --- a/examples/units/bar_unit_demo.py +++ b/examples/units/bar_unit_demo.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import numpy as np from basic_units import cm, inch import matplotlib.pyplot as plt diff --git a/examples/user_interfaces/embedding_in_gtk.py b/examples/user_interfaces/embedding_in_gtk.py index 00afdcd4f35d..7cb9467f5543 100644 --- a/examples/user_interfaces/embedding_in_gtk.py +++ b/examples/user_interfaces/embedding_in_gtk.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget to a gtk.Window diff --git a/examples/user_interfaces/embedding_in_gtk2.py b/examples/user_interfaces/embedding_in_gtk2.py index 898f5ea88633..2665e3123b26 100644 --- a/examples/user_interfaces/embedding_in_gtk2.py +++ b/examples/user_interfaces/embedding_in_gtk2.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and a toolbar to a gtk.Window diff --git a/examples/user_interfaces/embedding_in_gtk3.py b/examples/user_interfaces/embedding_in_gtk3.py index c852318c40a8..a8d2f59822a2 100755 --- a/examples/user_interfaces/embedding_in_gtk3.py +++ b/examples/user_interfaces/embedding_in_gtk3.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ demonstrate adding a FigureCanvasGTK3Agg widget to a Gtk.ScrolledWindow using GTK3 accessed via pygobject diff --git a/examples/user_interfaces/embedding_in_gtk3_panzoom.py b/examples/user_interfaces/embedding_in_gtk3_panzoom.py index c895561d7f42..34331a3e2e2c 100644 --- a/examples/user_interfaces/embedding_in_gtk3_panzoom.py +++ b/examples/user_interfaces/embedding_in_gtk3_panzoom.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ demonstrate NavigationToolbar with GTK3 accessed via pygobject """ diff --git a/examples/user_interfaces/embedding_in_qt4.py b/examples/user_interfaces/embedding_in_qt4.py index 0714b5c4dce3..31108c9bd300 100755 --- a/examples/user_interfaces/embedding_in_qt4.py +++ b/examples/user_interfaces/embedding_in_qt4.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # embedding_in_qt4.py --- Simple Qt4 application embedding matplotlib canvases # diff --git a/examples/user_interfaces/embedding_in_qt5.py b/examples/user_interfaces/embedding_in_qt5.py index 2b987c18b48b..95059c62b378 100755 --- a/examples/user_interfaces/embedding_in_qt5.py +++ b/examples/user_interfaces/embedding_in_qt5.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # embedding_in_qt5.py --- Simple Qt5 application embedding matplotlib canvases # diff --git a/examples/user_interfaces/embedding_in_tk.py b/examples/user_interfaces/embedding_in_tk.py index 4c93d25a9c84..b4aacd416b7d 100755 --- a/examples/user_interfaces/embedding_in_tk.py +++ b/examples/user_interfaces/embedding_in_tk.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import matplotlib matplotlib.use('TkAgg') diff --git a/examples/user_interfaces/embedding_in_tk2.py b/examples/user_interfaces/embedding_in_tk2.py index c762873e5972..ab6c98b66dee 100644 --- a/examples/user_interfaces/embedding_in_tk2.py +++ b/examples/user_interfaces/embedding_in_tk2.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import matplotlib matplotlib.use('TkAgg') diff --git a/examples/user_interfaces/embedding_in_tk_canvas.py b/examples/user_interfaces/embedding_in_tk_canvas.py index 6088042d4b9e..8e069bc6d930 100755 --- a/examples/user_interfaces/embedding_in_tk_canvas.py +++ b/examples/user_interfaces/embedding_in_tk_canvas.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- noplot -*- import matplotlib as mpl diff --git a/examples/user_interfaces/embedding_in_wx2.py b/examples/user_interfaces/embedding_in_wx2.py index 072e46e96186..55c1580babbd 100644 --- a/examples/user_interfaces/embedding_in_wx2.py +++ b/examples/user_interfaces/embedding_in_wx2.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ An example of how to use wx or wxagg in an application with the new toolbar - comment out the setA_toolbar line for no toolbar diff --git a/examples/user_interfaces/embedding_in_wx3.py b/examples/user_interfaces/embedding_in_wx3.py index a1fd7b65152c..76cd4196c513 100755 --- a/examples/user_interfaces/embedding_in_wx3.py +++ b/examples/user_interfaces/embedding_in_wx3.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - """ Copyright (C) 2003-2004 Andrew Straw, Jeremy O'Donoghue and others diff --git a/examples/user_interfaces/embedding_in_wx4.py b/examples/user_interfaces/embedding_in_wx4.py index 7f65f3bb0b7a..5270fc0c1d25 100644 --- a/examples/user_interfaces/embedding_in_wx4.py +++ b/examples/user_interfaces/embedding_in_wx4.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ An example of how to use wx or wxagg in an application with a custom toolbar diff --git a/examples/user_interfaces/embedding_in_wx5.py b/examples/user_interfaces/embedding_in_wx5.py index 65811d580893..83db43c545d2 100644 --- a/examples/user_interfaces/embedding_in_wx5.py +++ b/examples/user_interfaces/embedding_in_wx5.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # matplotlib requires wxPython 2.8+ # set the wxPython version in lib\site-packages\wx.pth file # or if you have wxversion installed un-comment the lines below diff --git a/examples/user_interfaces/fourier_demo_wx.py b/examples/user_interfaces/fourier_demo_wx.py index b68c300ed8d0..d07b07bb3882 100644 --- a/examples/user_interfaces/fourier_demo_wx.py +++ b/examples/user_interfaces/fourier_demo_wx.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python import numpy as np # matplotlib requires wxPython 2.8+ diff --git a/examples/user_interfaces/gtk_spreadsheet.py b/examples/user_interfaces/gtk_spreadsheet.py index efe2e43cf701..85798b0ca691 100644 --- a/examples/user_interfaces/gtk_spreadsheet.py +++ b/examples/user_interfaces/gtk_spreadsheet.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ Example of embedding matplotlib in an application and interacting with a treeview to store data. Double click on an entry to update plot diff --git a/examples/user_interfaces/histogram_demo_canvasagg.py b/examples/user_interfaces/histogram_demo_canvasagg.py index 3d48c455043e..11a13ba12185 100644 --- a/examples/user_interfaces/histogram_demo_canvasagg.py +++ b/examples/user_interfaces/histogram_demo_canvasagg.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ This is an example that shows you how to work directly with the agg figure canvas to create a figure using the pythonic API. diff --git a/examples/user_interfaces/interactive.py b/examples/user_interfaces/interactive.py index ec3ab637b97a..adc54264d76c 100755 --- a/examples/user_interfaces/interactive.py +++ b/examples/user_interfaces/interactive.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - """Multithreaded interactive interpreter with GTK and Matplotlib support. WARNING: diff --git a/examples/user_interfaces/interactive2.py b/examples/user_interfaces/interactive2.py index 6e174b0b7170..a6e7b700a113 100755 --- a/examples/user_interfaces/interactive2.py +++ b/examples/user_interfaces/interactive2.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import print_function # GTK Interactive Console diff --git a/examples/user_interfaces/mpl_with_glade.py b/examples/user_interfaces/mpl_with_glade.py index a2209a8310ba..340092ebeba3 100755 --- a/examples/user_interfaces/mpl_with_glade.py +++ b/examples/user_interfaces/mpl_with_glade.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from __future__ import print_function import matplotlib matplotlib.use('GTK') diff --git a/examples/user_interfaces/mpl_with_glade_316.py b/examples/user_interfaces/mpl_with_glade_316.py index 4c2318efd8a7..ca537b508de5 100644 --- a/examples/user_interfaces/mpl_with_glade_316.py +++ b/examples/user_interfaces/mpl_with_glade_316.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - from gi.repository import Gtk from matplotlib.figure import Figure diff --git a/examples/user_interfaces/svg_histogram.py b/examples/user_interfaces/svg_histogram.py index dd0279674bf4..fea08b8cd688 100755 --- a/examples/user_interfaces/svg_histogram.py +++ b/examples/user_interfaces/svg_histogram.py @@ -1,6 +1,3 @@ -#!/usr/bin/env python -#-*- encoding:utf-8 -*- - """ Demonstrate how to create an interactive histogram, in which bars are hidden or shown by cliking on legend markers. @@ -27,7 +24,7 @@ CSS could also be used more extensively to replace repetitive markup troughout the generated SVG. -__author__="david.huard@gmail.com" +Author: david.huard@gmail.com """ diff --git a/examples/widgets/cursor.py b/examples/widgets/cursor.py index 9a5d6350a560..209223b72a12 100755 --- a/examples/widgets/cursor.py +++ b/examples/widgets/cursor.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from matplotlib.widgets import Cursor import numpy as np import matplotlib.pyplot as plt diff --git a/examples/widgets/span_selector.py b/examples/widgets/span_selector.py index 13eef05e035e..d7bd5a1e426a 100755 --- a/examples/widgets/span_selector.py +++ b/examples/widgets/span_selector.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """ The SpanSelector is a mouse widget to select a xmin/xmax range and plot the detail view of the selected region in the lower axes