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

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/api/next_api_changes/2019-07-18-SL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Reduced default value of `axes.formatter.limits`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Changed the default value of `axes.formatter.limits` from -7, 7 to -5, 6 for better readability.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sameshl If you get a chance could you add a .. plot example to the API change note? It greatly helps people who are skimming the release note to understand the change!

2 changes: 1 addition & 1 deletion lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def _validate_linestyle(ls):
'axes.labelpad': [4.0, validate_float], # space between label and axis
'axes.labelweight': ['normal', validate_string], # fontsize of the x any y labels
'axes.labelcolor': ['black', validate_color], # color of axis label
'axes.formatter.limits': [[-7, 7], validate_nseq_int(2)],
'axes.formatter.limits': [[-5, 6], validate_nseq_int(2)],
# use scientific notation if log10
# of the axis range is smaller than the
# first or larger than the second
Expand Down
3 changes: 3 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,9 @@ def test_single_point():

@image_comparison(['single_date.png'], style='mpl20')
def test_single_date():
# use former defaults to match existing baseline image
plt.rcParams['axes.formatter.limits'] = -7, 7

time1 = [721964.0]
data1 = [-65.54]

Expand Down
3 changes: 3 additions & 0 deletions lib/matplotlib/tests/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def default_units(value, axis):
@image_comparison(['plot_pint.png'], remove_text=False, style='mpl20',
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
def test_numpy_facade(quantity_converter):
# use former defaults to match existing baseline image
plt.rcParams['axes.formatter.limits'] = -7, 7

# Register the class
munits.registry[Quantity] = quantity_converter

Expand Down