Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitbd83031

Browse files
committed
Further simplify example.
1 parente94428b commitbd83031

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎doc/users/next_whats_new/imshow_extent_units.rst

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp