Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9533cc6

Browse files
committed
Merge pull request #6342 from discardthree/mep12-hacknight-prep
DOC: Remove shebang lines from all examples. [MEP12]
2 parents 094007f + 13c3191 commit 9533cc6

File tree

91 files changed

+18
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+18
-130
lines changed

examples/animation/dynamic_image.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
An animated image
43
"""

examples/animation/dynamic_image2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
An animated image
43
"""

examples/api/agg_oo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# -*- noplot -*-
32
"""
43
A pure OO (look Ma, no pylab!) example using the agg backend

examples/api/barchart_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
#!/usr/bin/env python
31
# a bar plot with errorbars
42
import numpy as np
53
import matplotlib.pyplot as plt

examples/api/collections_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
'''Demonstration of LineCollection, PolyCollection, and
32
RegularPolyCollection with autoscaling.
43

examples/api/date_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Show how to make date plots in matplotlib using date tick locators and
43
formatters. See major_minor_demo1.py for more information on

examples/api/joinstyle.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Illustrate the three different join styles
43
"""

examples/api/power_norm_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/python
2-
31
from matplotlib import pyplot as plt
42
import matplotlib.colors as mcolors
53
import numpy as np

examples/api/sankey_demo_old.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
from __future__ import print_function
42

53
__author__ = "Yannick Copin <[email protected]>"

examples/api/two_scales.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
43
Demonstrate how to do two plots on the same axes with different left

examples/event_handling/keypress_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
"""
42
Show how to connect to keypress events
53
"""

examples/event_handling/pick_event_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
"""
42
53
You can enable picking by setting the "picker" property of an artist

examples/event_handling/pipong.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# A matplotlib based game of Pong illustrating one way to write interactive
32
# animation which are easily ported to multiple backends
43
# pipong.py was written by Paul Ivanov <http://pirsquared.org>

examples/event_handling/pong_gtk.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
from __future__ import print_function
42

53
# For detailed comments on animation and the techniques used here, see

examples/event_handling/test_mouseclicks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
from __future__ import print_function
32

43
import matplotlib

examples/misc/ftface_props.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
from __future__ import print_function
42
"""
53
This is a demo script to show you how to use all the properties of an

examples/pylab_examples/accented_text.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
matplotlib supports accented characters via TeX mathtext
43

examples/pylab_examples/agg_buffer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Use backend agg to access the figure canvas as an RGB string and then
43
convert it to an array and pass it to Pillow for rendering.

examples/pylab_examples/alignment_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
You can precisely layout text in data or axes (0,1) coordinates. This
43
example shows you some of the alignment and rotation specifications to

examples/pylab_examples/anscombe.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
from __future__ import print_function
42
"""
53
Edward Tufte uses this example from Anscombe to show 4 datasets of x

examples/pylab_examples/arrow_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""Arrow drawing example for the new fancy_arrow facilities.
32
43
Code contributed by: Rob Knight <[email protected]>

examples/pylab_examples/bar_stacked.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# a stacked bar plot with errorbars
32
import numpy as np
43
import matplotlib.pyplot as plt

examples/pylab_examples/cohere_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Compute the coherence of two signals
43
"""

examples/pylab_examples/color_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
matplotlib gives you 5 ways to specify colors,
43

examples/pylab_examples/colours.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# -*- noplot -*-
32
"""
43
Some simple functions to generate colours.

examples/pylab_examples/contour_corner_mask.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Illustrate the difference between corner_mask=False and corner_mask=True
43
for masked contour plots.

examples/pylab_examples/contour_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Illustrate simple contour plotting, contours on an image with
43
a colorbar for the contours, and labelled contours.

examples/pylab_examples/contour_image.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
'''
32
Test combinations of contouring, filled contouring, and image plotting.
43
For contour labelling, see contour_demo.py.

examples/pylab_examples/contour_label_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Illustrate some of the more advanced things that one can do with
43
contour labels.

examples/pylab_examples/contourf_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
import numpy as np
32
import matplotlib.pyplot as plt
43

examples/pylab_examples/coords_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
"""
42
An example of how to interact with the plotting canvas by connecting
53
to move and click events

examples/pylab_examples/coords_report.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
# override the default reporting of coords
42

53
import matplotlib.pyplot as plt

examples/pylab_examples/csd_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Compute the cross spectral density of two signals
43
"""

examples/pylab_examples/custom_cmap.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
import numpy as np
42
import matplotlib.pyplot as plt
53
from matplotlib.colors import LinearSegmentedColormap

examples/pylab_examples/custom_ticker1.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
"""
42
The new ticker code was designed to explicitly support user customized
53
ticking. The documentation

examples/pylab_examples/data_helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# Some functions to load a return data for the plot demos
32

43
from numpy import fromstring, argsort, take, array, resize

examples/pylab_examples/date_demo1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Show how to make date plots in matplotlib using date tick locators and
43
formatters. See major_minor_demo1.py for more information on

examples/pylab_examples/date_demo2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
#!/usr/bin/env python
2-
31
"""
42
Show how to make date plots in matplotlib using date tick locators and
53
formatters. See major_minor_demo1.py for more information on
64
controlling major and minor ticks
75
"""
6+
87
from __future__ import print_function
98
import datetime
109
import matplotlib.pyplot as plt

examples/pylab_examples/date_demo_convert.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
import datetime
42
import matplotlib.pyplot as plt
53
from matplotlib.dates import DayLocator, HourLocator, DateFormatter, drange

examples/pylab_examples/date_demo_rrule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Show how to use an rrule instance to make a custom date ticker - here
43
we put a tick mark on every 5th easter

examples/pylab_examples/equal_aspect_ratio.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Example: simple line plot.
43
Show how to make a plot that has equal aspect ratio

examples/pylab_examples/eventcollection_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/env python
2-
# -*- Coding:utf-8 -*-
3-
'''Plot two curves, then use EventCollections to mark the locations of the x
4-
and y data points on the respective axes for each curve'''
1+
'''
2+
Plot two curves, then use EventCollections to mark the locations of the x
3+
and y data points on the respective axes for each curve
4+
'''
55

66
import matplotlib.pyplot as plt
77
from matplotlib.collections import EventCollection

examples/pylab_examples/eventplot_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/env python
2-
# -*- Coding:utf-8 -*-
3-
'''an eventplot showing sequences of events with various line properties
4-
the plot is shown in both horizontal and vertical orientations'''
1+
'''
2+
An eventplot showing sequences of events with various line properties.
3+
The plot is shown in both horizontal and vertical orientations.
4+
'''
55

66
import matplotlib.pyplot as plt
77
import numpy as np

examples/pylab_examples/fill_between_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
import matplotlib.pyplot as plt
32
import numpy as np
43

examples/pylab_examples/finance_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
import matplotlib.pyplot as plt
32
from matplotlib.dates import DateFormatter, WeekdayLocator,\
43
DayLocator, MONDAY

examples/pylab_examples/ginput_manual_clabel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# -*- noplot -*-
32

43
from __future__ import print_function

examples/pylab_examples/hyperlinks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# -*- noplot -*-
32

43
"""

examples/pylab_examples/image_clip_path.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
import numpy as np
32
import matplotlib.cm as cm
43
import matplotlib.mlab as mlab

examples/pylab_examples/image_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
import numpy as np
32
import matplotlib.cm as cm
43
import matplotlib.mlab as mlab

examples/pylab_examples/leftventricle_bulleye.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
This example demonstrates how to create the 17 segment model for the left
43
ventricle recommended by the American Heart Association (AHA).

examples/pylab_examples/major_minor_demo2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Automatic tick selection for major and minor ticks.
43

examples/pylab_examples/mathtext_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Use matplotlib's internal LaTeX parser and layout engine. For true
43
latex rendering, see the text.usetex option

examples/pylab_examples/movie_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# -*- noplot -*-
32

43
from __future__ import print_function

examples/pylab_examples/mri_with_eeg.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
#!/usr/bin/env python
2-
31
"""
42
This now uses the imshow command instead of pcolor which *is much
53
faster*
64
"""
5+
76
from __future__ import division, print_function
87

98
import numpy as np

examples/pylab_examples/multi_image.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
'''
32
Make a set of images with a single colormap, norm, and colorbar.
43

examples/pylab_examples/multicolored_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/env python
21
'''
32
Color parts of a line based on its properties, e.g., slope.
43
'''
4+
55
import numpy as np
66
import matplotlib.pyplot as plt
77
from matplotlib.collections import LineCollection

examples/pylab_examples/polar_legend.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
import numpy as np
42
from matplotlib.pyplot import figure, show, rc
53

examples/pylab_examples/quadmesh_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
pcolormesh uses a QuadMesh, a faster generalization of pcolor, but
43
with some restrictions.

examples/pylab_examples/symlog_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
import matplotlib.pyplot as plt
42
import numpy as np
53

examples/pylab_examples/tex_unicode_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# -*- coding: utf-8 -*-
32
"""
43
This demo is tex_demo.py modified to have unicode. See that file for

examples/pylab_examples/text_handles.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
#!/usr/bin/env python
2-
# Controlling the properties of axis text using handles
1+
"""
2+
Controlling the properties of axis text using handles
33

4-
# See examples/text_themes.py for a more elegant, pythonic way to control
5-
# fonts. After all, if we were slaves to MATLAB , we wouldn't be
6-
# using python!
4+
See examples/text_themes.py for a more elegant, pythonic way to control
5+
fonts. After all, if we were slaves to MATLAB , we wouldn't be
6+
using python!
7+
"""
78

89
import matplotlib.pyplot as plt
910
import numpy as np

examples/pylab_examples/text_rotation_relative_to_line.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Text objects in matplotlib are normally rotated with respect to the
43
screen coordinate system (i.e., 45 degrees rotation plots text along a

examples/pylab_examples/titles_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
matplotlib can display plot titles centered, flush with the left side of
43
a set of axes, and flush with the right side of a set of axes.

examples/pylab_examples/toggle_images.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
""" toggle between two images by pressing "t"
32

43
The basic idea is to load two images (they can be different shapes) and plot

examples/pylab_examples/webapp_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
# -*- noplot -*-
32
"""
43
This example shows how to use the agg backend directly to create

examples/pylab_examples/zorder_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
The default drawing order for axes is patches, lines, text. This
43
order is determined by the zorder attribute. The following defaults

examples/tests/backend_driver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
from __future__ import print_function, division
42
"""
53
This is used to drive many of the examples across the backends, for

examples/units/bar_unit_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
import numpy as np
32
from basic_units import cm, inch
43
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)