Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pandas/tests/plotting/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pandas import (
DataFrame,
Series,
Timestamp,
)
import pandas._testing as tm
from pandas.tests.plotting.common import (
Expand Down Expand Up @@ -549,3 +550,15 @@ def test_externally_shared_axes(self):
assert not plots[0][0].xaxis.get_label().get_visible()
assert plots[0][1].xaxis.get_label().get_visible()
assert not plots[0][2].xaxis.get_label().get_visible()

def test_plot_bar_axis_units_timestamp_conversion(self):
# GH 38736
# Ensure string x-axis from the second plot will not be converted to datetime
# due to axis data from first plot
df = DataFrame(
[1.0],
index=[Timestamp("2022-02-22 22:22:22")],
)
_check_plot_works(df.plot)
s = Series({"A": 1.0})
_check_plot_works(s.plot.bar)