File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 88from pandas import (
99 DataFrame ,
1010 Series ,
11+ Timestamp ,
1112)
1213import pandas ._testing as tm
1314from pandas .tests .plotting .common import (
@@ -549,3 +550,15 @@ def test_externally_shared_axes(self):
549550 assert not plots [0 ][0 ].xaxis .get_label ().get_visible ()
550551 assert plots [0 ][1 ].xaxis .get_label ().get_visible ()
551552 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