Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 28e1c7f

Browse filesBrowse files
committed
engformatter related small fixes
1 parent 5e2aa99 commit 28e1c7f
Copy full SHA for 28e1c7f

File tree

Expand file treeCollapse file tree

2 files changed

+2
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-6
lines changed

‎galleries/examples/ticks/engformatter_offset.py

Copy file name to clipboardExpand all lines: galleries/examples/ticks/engformatter_offset.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
unit=UNIT
2828
))
2929
size = 100
30-
measurement = np.full(size, 1)*1e9
31-
noise = np.random.uniform(low=-2e3, high=2e3, size=(size))
30+
measurement = np.full(size, 1e9)
31+
noise = np.random.uniform(low=-2e3, high=2e3, size=size)
3232
ax.plot(measurement + noise)
3333
plt.show()

‎lib/matplotlib/tests/test_ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_ticker.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,6 @@ def test_engformatter_offset_oom(
16221622
oom_noise_desired
16231623
):
16241624
UNIT = "eV"
1625-
# Doesn't really matter here, but should be of order of magnitude ~= 1
16261625
fig, ax = plt.subplots()
16271626
# Use some random ugly number
16281627
data_offset = 2.7149*10**oom_center
@@ -1641,9 +1640,6 @@ def test_engformatter_offset_oom(
16411640
# only makes sure that offset text and the ticks gets the correct unit
16421641
# prefixes and the ticks.
16431642
if formatter.offset:
1644-
# These prefix_ variables are used only once, so we could have inlined
1645-
# them all, but it is more comfortable in case of tests breakages to
1646-
# view their values with pytest --showlocals.
16471643
prefix_noise_got = offset_got[2]
16481644
prefix_noise_desired = formatter.ENG_PREFIXES[oom_noise_desired]
16491645
prefix_center_got = offset_got[-1-len(UNIT)]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.