We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f366e4 commit b14d62eCopy full SHA for b14d62e
pandas/tests/plotting/test_misc.py
@@ -8,6 +8,7 @@
8
from pandas import (
9
DataFrame,
10
Series,
11
+ Timestamp,
12
)
13
import pandas._testing as tm
14
from pandas.tests.plotting.common import (
@@ -549,3 +550,15 @@ def test_externally_shared_axes(self):
549
550
assert not plots[0][0].xaxis.get_label().get_visible()
551
assert plots[0][1].xaxis.get_label().get_visible()
552
assert not plots[0][2].xaxis.get_label().get_visible()
553
+
554
+ def test_plot_bar_axis_units_timestamp_conversion(self):
555
+ # GH 38736
556
+ # Ensure string x-axis from the second plot will not be converted to datetime
557
+ # due to axis data from first plot
558
+ df = DataFrame(
559
+ [1.0],
560
+ index=[Timestamp("2022-02-22 22:22:22")],
561
+ )
562
+ _check_plot_works(df.plot)
563
+ s = Series({"A": 1.0})
564
+ _check_plot_works(s.plot.bar)
0 commit comments