| 406 | |
| 407 | @mpl.style.context("default") |
| 408 | def test_fill(self): |
| 409 | mpl.rcParams["date.converter"] = "concise" |
| 410 | fig, (ax1, ax2, ax3, ax4) = plt.subplots(4, 1, layout="constrained") |
| 411 | |
| 412 | np.random.seed(19680801) |
| 413 | |
| 414 | x_base_date = datetime.datetime(2023, 1, 1) |
| 415 | x_dates = [x_base_date] |
| 416 | for _ in range(1, 5): |
| 417 | x_base_date += datetime.timedelta(days=np.random.randint(1, 5)) |
| 418 | x_dates.append(x_base_date) |
| 419 | |
| 420 | y_base_date = datetime.datetime(2023, 1, 1) |
| 421 | y_dates = [y_base_date] |
| 422 | for _ in range(1, 5): |
| 423 | y_base_date += datetime.timedelta(days=np.random.randint(1, 5)) |
| 424 | y_dates.append(y_base_date) |
| 425 | |
| 426 | x_values = np.random.rand(5) * 5 |
| 427 | y_values = np.random.rand(5) * 5 - 2 |
| 428 | |
| 429 | ax1.fill(x_dates, y_values) |
| 430 | ax2.fill(x_values, y_dates) |
| 431 | ax3.fill(x_values, y_values) |
| 432 | ax4.fill(x_dates, y_dates) |
| 433 | |
| 434 | @mpl.style.context("default") |
| 435 | def test_fill_between(self): |