File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 8
8
from pandas import (
9
9
DataFrame ,
10
10
Series ,
11
+ Timestamp ,
11
12
)
12
13
import pandas ._testing as tm
13
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 ()
550
551
assert plots [0 ][1 ].xaxis .get_label ().get_visible ()
551
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 )
You can’t perform that action at this time.
0 commit comments