MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_stem

Method test_stem

lib/matplotlib/tests/test_datetime.py:729–754  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

727
728 @mpl.style.context("default")
729 def test_stem(self):
730 mpl.rcParams["date.converter"] = "concise"
731
732 fig, (ax1, ax2, ax3, ax4, ax5, ax6) = plt.subplots(6, 1, layout="constrained")
733
734 limit_value = 10
735 above = datetime.datetime(2023, 9, 18)
736 below = datetime.datetime(2023, 11, 18)
737
738 x_ranges = np.arange(1, limit_value)
739 y_ranges = np.arange(1, limit_value)
740
741 x_dates = np.array(
742 [datetime.datetime(2023, 10, n) for n in range(1, limit_value)]
743 )
744 y_dates = np.array(
745 [datetime.datetime(2023, 10, n) for n in range(1, limit_value)]
746 )
747
748 ax1.stem(x_dates, y_dates, bottom=above)
749 ax2.stem(x_dates, y_ranges, bottom=5)
750 ax3.stem(x_ranges, y_dates, bottom=below)
751
752 ax4.stem(x_ranges, y_dates, orientation="horizontal", bottom=above)
753 ax5.stem(x_dates, y_ranges, orientation="horizontal", bottom=5)
754 ax6.stem(x_ranges, y_dates, orientation="horizontal", bottom=below)
755
756 @mpl.style.context("default")
757 def test_step(self):

Callers

nothing calls this directly

Calls 2

subplotsMethod · 0.45
stemMethod · 0.45

Tested by

no test coverage detected