Skip to content

Commit

Permalink
CLN: resolve UserWarning pandas-dev#35945
Browse files Browse the repository at this point in the history
  • Loading branch information
fangchenli committed Aug 28, 2020
1 parent a1f6056 commit 7c2a095
Showing 1 changed file with 1 addition and 3 deletions.
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

0 comments on commit 7c2a095

Please sign in to comment.