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 bd83031

Browse filesBrowse files
committed
Further simplify example.
1 parent e94428b commit bd83031
Copy full SHA for bd83031

File tree

Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed

‎doc/users/next_whats_new/imshow_extent_units.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/imshow_extent_units.rst
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@ can now be expressed with units.
88

99
import matplotlib.pyplot as plt
1010
import numpy as np
11-
from matplotlib.dates import DateFormatter
1211

1312
fig, ax = plt.subplots(layout='constrained')
1413
date_first = np.datetime64('2020-01-01', 'D')
1514
date_last = np.datetime64('2020-01-11', 'D')
1615

1716
arr = [[i+j for i in range(10)] for j in range(10)]
1817

19-
ax.imshow(arr, origin='lower', extent=[1, 11, date_first, date_last])
20-
21-
ax.yaxis.set_major_formatter(DateFormatter('%d/%m/%y'))
18+
ax.imshow(arr, origin='lower', extent=[0, 10, date_first, date_last])
2219

2320
plt.show()

0 commit comments

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