8000 Use triple-double-quotes for docstrings · matplotlib/matplotlib@60055a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 60055a0

Browse files
committed
Use triple-double-quotes for docstrings
1 parent 44ccb0e commit 60055a0

File tree

85 files changed

+479
-525
lines changed

Some content is hidden

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

85 files changed

+479
-525
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ignore =
1414
# pydocstyle
1515
D100, D101, D102, D103, D104, D105, D106, D107,
1616
D200, D202, D203, D204, D205, D207, D209, D212, D213,
17-
D300, D301
17+
D301
1818
D400, D401, D402, D403, D413,
1919

2020
exclude =

examples/images_contours_and_fields/barb_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
=========
33
Barb Demo
44
=========
55
66
Demonstration of wind barb plots
7-
'''
7+
"""
88
import matplotlib.pyplot as plt
99
import numpy as np
1010

examples/lines_bars_and_markers/multicolored_line.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
'''
1+
"""
22
==================
33
Multicolored lines
44
==================
55
66
This example shows how to make a multi-colored line. In this example, the line
77
is colored based on its derivative.
8-
'''
8+
"""
99

1010
import numpy as np
1111
import matplotlib.pyplot as plt

examples/misc/transoffset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
===========
33
Transoffset
44
===========
@@ -16,7 +16,7 @@
1616
use the offset_copy function to make a modified copy of
1717
this transform, where the modification consists of an
1818
offset.
19-
'''
19+
"""
2020

2121
import matplotlib.pyplot as plt
2222
import matplotlib.transforms as mtransforms

examples/mplot3d/contour3d_2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
'''
1+
"""
22
============================================================================
33
Demonstrates plotting contour (level) curves in 3D using the extend3d option
44
============================================================================
55
66
This modification of the contour3d_demo example uses extend3d=True to
77
extend the curves vertically into 'ribbons'.
8-
'''
8+
"""
99

1010
from mpl_toolkits.mplot3d import axes3d
1111
import matplotlib.pyplot as plt

examples/mplot3d/contour3d_3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
========================================
33
Projecting contour profiles onto a graph
44
========================================
@@ -7,7 +7,7 @@
77
onto the 'walls' of the graph.
88
99
See contourf3d_demo2 for the filled version.
10-
'''
10+
"""
1111

1212
from mpl_toolkits.mplot3d import axes3d
1313
import matplotlib.pyplot as plt

examples/mplot3d/contourf3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
===============
33
Filled contours
44
===============
@@ -8,7 +8,7 @@
88
99
This is like a contourf plot in 2D except that the shaded region corresponding
1010
to the level c is graphed on the plane z=c.
11-
'''
11+
"""
1212

1313
from mpl_toolkits.mplot3d import axes3d
1414
import matplotlib.pyplot as plt

examples/mplot3d/contourf3d_2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
======================================
33
Projecting filled contour onto a graph
44
======================================
@@ -7,7 +7,7 @@
77
'profiles' onto the 'walls' of the graph.
88
99
See contour3d_demo2 for the unfilled version.
10-
'''
10+
"""
1111

1212
from mpl_toolkits.mplot3d import axes3d
1313
import matplotlib.pyplot as plt

examples/mplot3d/lines3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
================
33
Parametric Curve
44
================
55
66
This example demonstrates plotting a parametric curve in 3D.
7-
'''
7+
"""
88

99
import numpy as np
1010
import matplotlib.pyplot as plt

examples/mplot3d/lorenz_attractor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919

2020

2121
def lorenz(x, y, z, s=10, r=28, b=2.667):
22-
'''
22+
"""
2323
Given:
2424
x, y, z: a point of interest in three dimensional space
2525
s, r, b: parameters defining the lorenz attractor
2626
Returns:
2727
x_dot, y_dot, z_dot: values of the lorenz attractor's partial
2828
derivatives at the point x, y, z
29-
'''
29+
"""
3030
x_dot = s*(y - x)
3131
y_dot = r*x - y - x*z
3232
z_dot = x*y - b*z

examples/mplot3d/offset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
=========================
33
Automatic Text Offsetting
44
=========================
@@ -11,7 +11,7 @@
1111
This demo triggers the display of the offset text for the x and
1212
y axis by adding 1e5 to X and Y. Anything less would not
1313
automatically trigger it.
14-
'''
14+
"""
1515

1616
import matplotlib.pyplot as plt
1717
import numpy as np

examples/mplot3d/pathpatch3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515

1616

1717
def text3d(ax, xyz, s, zdir="z", size=None, angle=0, usetex=False, **kwargs):
18-
'''
18+
"""
1919
Plots the string 's' on the axes 'ax', with position 'xyz', size 'size',
2020
and rotation angle 'angle'. 'zdir' gives the axis which is to be treated
2121
as the third dimension. usetex is a boolean indicating whether the string
2222
should be interpreted as latex or not. Any additional keyword arguments
2323
are passed on to transform_path.
2424
2525
Note: zdir affects the interpretation of xyz.
26-
'''
26+
"""
2727
x, y, z = xyz
2828
if zdir == "y":
2929
xy1, z1 = (x, z), y

examples/mplot3d/quiver3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
==============
33
3D quiver plot
44
==============
55
66
Demonstrates plotting directional arrows at points on a 3d meshgrid.
7-
'''
7+
"""
88

99
import matplotlib.pyplot as plt
1010
import numpy as np

examples/mplot3d/rotate_axes3d_sgskip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
==================
33
Rotating a 3D plot
44
==================
@@ -9,7 +9,7 @@
99
1010
(This example is skipped when building the documentation gallery because it
1111
intentionally takes a long time to run)
12-
'''
12+
"""
1313

1414
from mpl_toolkits.mplot3d import axes3d
1515
import matplotlib.pyplot as plt

examples/mplot3d/scatter3d.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
==============
33
3D scatterplot
44
==============
55
66
Demonstration of a basic scatterplot in 3D.
7-
'''
7+
"""
88

99
import matplotlib.pyplot as plt
1010
import numpy as np
@@ -14,10 +14,10 @@
1414

1515

1616
def randrange(n, vmin, vmax):
17-
'''
17+
"""
1818
Helper function to make an array of random numbers having shape (n, )
1919
with each number distributed Uniform(vmin, vmax).
20-
'''
20+
"""
2121
return (vmax - vmin)*np.random.rand(n) + vmin
2222

2323
fig = plt.figure()

examples/mplot3d/subplot3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
====================
33
3D plots as subplots
44
====================
55
66
Demonstrate including 3D plots as subplots.
7-
'''
7+
"""
88

99
import matplotlib.pyplot as plt
1010
from matplotlib import cm

examples/mplot3d/surface3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
======================
33
3D surface (color map)
44
======================
@@ -8,7 +8,7 @@
88
99
Also demonstrates using the LinearLocator and custom formatting for the
1010
z axis tick labels.
11-
'''
11+
"""
1212

1313
import matplotlib.pyplot as plt
1414
from matplotlib import cm

examples/mplot3d/surface3d_2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
========================
33
3D surface (solid color)
44
========================
55
66
Demonstrates a very basic plot of a 3D surface using a solid color.
7-
'''
7+
"""
88

99
import matplotlib.pyplot as plt
1010
import numpy as np

examples/mplot3d/surface3d_3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
=========================
33
3D surface (checkerboard)
44
=========================
55
66
Demonstrates plotting a 3D surface colored in a checkerboard pattern.
7-
'''
7+
"""
88

99
import matplotlib.pyplot as plt
1010
from matplotlib.ticker import LinearLocator

examples/mplot3d/surface3d_radial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
=================================
33
3D surface with polar coordinates
44
=================================
@@ -8,7 +8,7 @@
88
Also demonstrates writing axis labels with latex math mode.
99
1010
Example contributed by Armin Moser.
11-
'''
11+
"""
1212

1313
import matplotlib.pyplot as plt
1414
import numpy as np

examples/mplot3d/text3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'''
1+
"""
22
======================
33
Text annotations in 3D
44
======================
@@ -14,7 +14,7 @@
1414
- Using the text2D function to place text on a fixed position on the ax
1515
object.
1616
17-
'''
17+
"""
1818

1919
import matplotlib.pyplot as plt
2020

examples/mplot3d/trisurf3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
======================
33
Triangular 3D surfaces
44
======================
55
66
Plot a 3D surface with a triangular mesh.
7-
'''
7+
"""
88

99
import matplotlib.pyplot as plt
1010
import numpy as np

examples/mplot3d/voxels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
==========================
33
3D voxel / volumetric plot
44
==========================
55
66
Demonstrates plotting 3D volumetric objects with `.Axes3D.voxels`.
7-
'''
7+
"""
88

99
import matplotlib.pyplot as plt
1010
import numpy as np

examples/mplot3d/voxels_numpy_logo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
===============================
33
3D voxel plot of the numpy logo
44
===============================
55
66
Demonstrates using `.Axes3D.voxels` with uneven coordinates.
7-
'''
7+
"""
88
import matplotlib.pyplot as plt
99
import numpy as np
1010

examples/mplot3d/voxels_torus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
=======================================================
33
3D voxel / volumetric plot with cylindrical coordinates
44
=======================================================
55
66
Demonstrates using the *x*, *y*, *z* arguments of `.Axes3D.voxels`.
7-
'''
7+
"""
88

99
import matplotlib.pyplot as plt
1010
import matplotlib.colors

examples/mplot3d/wire3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
'''
1+
"""
22
=================
33
3D wireframe plot
44
=================
55
66
A very basic demonstration of a wireframe plot.
7-
'''
7+
"""
88

99
from mpl_toolkits.mplot3d import axes3d
1010
import matplotlib.pyplot as plt

examples/mplot3d/wire3d_animation_sgskip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616

1717
def generate(X, Y, phi):
18-
'''
18+
"""
1919
Generates Z data for the points in the X, Y meshgrid and parameter phi.
20-
'''
20+
"""
2121
R = 1 - np.sqrt(X**2 + Y**2)
2222
return np.cos(2 * np.pi * X + phi) * R
2323

0 commit comments

Comments
 (0)
0