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

Skip to content

Commit d01a2a9

Browse files
author
Jakub Klus
committed
Fix flake8 formatting.
1 parent 771cb80 commit d01a2a9

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tutorials/intermediate/autoscale.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
Autoscaling
33
===========
44
5-
The limits on an axis can be set manually (e.g. ``ax.set_xlim(xmin, xmax)``) or Matplotlib can set them automatically based on the data already on the axes. There are a number of options to this autoscaling behaviour, discussed below.
5+
The limits on an axis can be set manually (e.g. ``ax.set_xlim(xmin, xmax)``)
6+
or Matplotlib can set them automatically based on the data already on the axes.
7+
There are a number of options to this autoscaling behaviour, discussed below.
68
"""
79

810
###############################################################################
@@ -36,20 +38,18 @@
3638
fig.show()
3739

3840
###############################################################################
39-
# In general, margins can be in the range (-0.5, ∞), where negative margins set the axes limits to
40-
# a fraction of the data range, and allow a zoom effect. Using a single number for margins
41-
# affects both axes, a single margin can be customized using keyword
42-
# arguments ``x`` or ``y``, but positional and keyword interface cannot be
43-
# combined
41+
# In general, margins can be in the range (-0.5, ∞), where negative margins set
42+
# the axes limits to a fraction of the data range, and allow a zoom effect.
43+
# Using a single number for margins affects both axes, a single margin can be
44+
# customized using keyword arguments ``x`` or ``y``, but positional and keyword
45+
# interface cannot be combined.
4446

4547
fig, ax = plt.subplots()
4648
ax.plot(x, y)
4749
ax.margins(y=-0.2)
4850
fig.show()
4951

5052
###############################################################################
51-
#
52-
#
5353
# Sticky edges
5454
# ------------
5555
# Some :class:`.Artist` objects do not allow margins. For example, setting
@@ -71,7 +71,7 @@
7171
# This override of margins is determined by "sticky edges", a
7272
# property of :class:`.Artist` class that can suppress adding margins to axis
7373
# limits. The effect of sticky edges can be disabled on an Axes by changing
74-
# `~matplotlib.axes.Axes.use_sticky_edges`.
74+
# `~matplotlib.axes.Axes.use_sticky_edges`.
7575
# Artists have a property `.Artist.sticky_edges`, and the values of
7676
# sticky edges can be changed by writing to ``Artist.sticky_edges.x`` or
7777
# ``.Artist.sticky_edges.y``.
@@ -160,6 +160,7 @@
160160
###############################################################################
161161
# Working with collections
162162
# ------------------------
163+
#
163164
# Autoscale works out of the box for all lines, patches, and images added to
164165
# the axes. One of the artists that it won't work with is a `.Collection`.
165166
# After adding a collection to the axes, one has to manually trigger the

0 commit comments

Comments
 (0)