Skip to content

Commit

Permalink
Merge pull request #6342 from discardthree/mep12-hacknight-prep
Browse files Browse the repository at this point in the history
DOC: Remove shebang lines from all examples. [MEP12]

Conflicts:
	examples/pylab_examples/date_demo1.py
	  - removed since the source PR
	examples/pylab_examples/date_demo2.py
	  - removed since the source PR
	examples/pylab_examples/finance_demo.py
	  - removed since the source PR
	examples/pylab_examples/mri_with_eeg.py
	  - resolved in favor of current text
  • Loading branch information
tacaswell committed Nov 11, 2016
1 parent f87100a commit c922fcc
Show file tree
Hide file tree
Showing 88 changed files with 17 additions and 124 deletions.
1 change: 0 additions & 1 deletion examples/animation/dynamic_image.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
=================
An animated image
Expand Down
1 change: 0 additions & 1 deletion examples/animation/dynamic_image2.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
========================================
An animated image using a list of images
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion examples/api/collections_demo.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
'''Demonstration of LineCollection, PolyCollection, and
RegularPolyCollection with autoscaling.
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion examples/api/joinstyle.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
Illustrate the three different join styles
"""
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
2 changes: 0 additions & 2 deletions examples/api/sankey_demo_old.py
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from __future__ import print_function

__author__ = "Yannick Copin <ycopin@ipnl.in2p3.fr>"
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
2 changes: 0 additions & 2 deletions examples/event_handling/keypress_demo.py
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
Show how to connect to keypress events
"""
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion 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 <http://pirsquared.org>
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion examples/event_handling/test_mouseclicks.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
from __future__ import print_function

import matplotlib
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/accented_text.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
matplotlib supports accented characters via TeX mathtext
Expand Down
1 change: 0 additions & 1 deletion 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.
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion 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 <rob@spot.colorado.edu>
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/cohere_demo.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
Compute the coherence of two signals
"""
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/color_demo.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
matplotlib gives you 5 ways to specify colors,
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/colours.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- noplot -*-
"""
Some simple functions to generate colours.
Expand Down
1 change: 0 additions & 1 deletion 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.
Expand Down
1 change: 0 additions & 1 deletion 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.
Expand Down
1 change: 0 additions & 1 deletion 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.
Expand Down
1 change: 0 additions & 1 deletion 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.
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/contourf_demo.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt

Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/csd_demo.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
Compute the cross spectral density of two signals
"""
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
8 changes: 4 additions & 4 deletions 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
Expand Down
8 changes: 4 additions & 4 deletions 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
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/fill_between_demo.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/ginput_manual_clabel.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- noplot -*-

from __future__ import print_function
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/hyperlinks.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- noplot -*-

"""
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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).
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/major_minor_demo2.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
Automatic tick selection for major and minor ticks.
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion examples/pylab_examples/movie_demo.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- noplot -*-

from __future__ import print_function
Expand Down
1 change: 1 addition & 0 deletions examples/pylab_examples/mri_with_eeg.py
@@ -1,6 +1,7 @@
"""Displays a set of subplots with an MRI image, its intensity histogram and
some EEG traces.
"""

from __future__ import division, print_function

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion 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.

Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 0 additions & 2 deletions 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

Expand Down
1 change: 0 additions & 1 deletion 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.
Expand Down
2 changes: 0 additions & 2 deletions examples/pylab_examples/symlog_demo.py
@@ -1,5 +1,3 @@
#!/usr/bin/env python

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
11 changes: 6 additions & 5 deletions 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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.
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
2 changes: 0 additions & 2 deletions 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion 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
Expand Down
1 change: 0 additions & 1 deletion examples/user_interfaces/embedding_in_gtk3_panzoom.py
@@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
demonstrate NavigationToolbar with GTK3 accessed via pygobject
"""
Expand Down
1 change: 0 additions & 1 deletion 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
#
Expand Down

0 comments on commit c922fcc

Please sign in to comment.