8000 Inconsistent indexes for tick label plotting by nrebena · Pull Request #28733 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Inconsistent indexes for tick label plotting #28733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Nov 21, 2020
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
Prev Previous commit
Next Next commit
CLN: Remove duplicate code line
  • Loading branch information
nrebena committed Sep 12, 2020
commit 28f06fc683531943f850d467350a9c821a3433d7
3 changes: 1 addition & 2 deletions pandas/plotting/_matplotlib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,11 +1393,10 @@ def _make_plot(self):
if self.orientation == "vertical":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any assert in orientation that it takes on only certain values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No assert. Orientation is never a parameter. It is defined by the BarPlot class as "vertical", and overloaded by the Barhplot class as "horizontal". It is also defined in LinePlot class.
Globaly, it is use by the _post_plot_logic_common method from the base class MPLPlot.

ax.xaxis.update_units(self.ax_index)
self.tick_pos = ax.convert_xunits(self.ax_index).astype(np.int)
self.ax_pos = self.tick_pos - self.tickoffset
elif self.orientation == "horizontal":
ax.yaxis.update_units(self.ax_index)
self.tick_pos = ax.convert_yunits(self.ax_index).astype(np.int)
self.ax_pos = self.tick_pos - self.tickoffset
self.ax_pos = self.tick_pos - self.tickoffset

kwds = self.kwds.copy()
if self._is_series:
Expand Down
0