Skip to content
Merged
Changes from 1 commit
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
4 changes: 1 addition & 3 deletions pandas/plotting/_matplotlib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,6 @@ def _update_stacker(cls, ax, stacking_id, values):
ax._stacker_neg_prior[stacking_id] += values

def _post_plot_logic(self, ax, data):
from matplotlib.ticker import FixedLocator

def get_label(i):
if is_float(i) and i.is_integer():
i = int(i)
Expand All @@ -1232,8 +1230,8 @@ def get_label(i):
if self._need_to_set_index:
xticks = ax.get_xticks()
xticklabels = [get_label(x) for x in xticks]
ax.set_xticks(xticks)
ax.set_xticklabels(xticklabels)
ax.xaxis.set_major_locator(FixedLocator(xticks))

condition = (
not self._use_dynamic_x()
Expand Down