Skip to content

Issue 6830 fix #8471

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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: 12 additions & 1 deletion lib/mpl_toolkits/axisartist/axis_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,18 @@ def _get_tick_info(self, tick_iter):
ticklabel_add_angle = self._ticklabel_add_angle

for loc, angle_normal, angle_tangent, label in tick_iter:
angle_label = angle_tangent - 90
angle_label = angle_tangent - 90

if (self._axis_direction == "top" or self._axis_direction == "bottom"):
    for x in self.axes.get_xticklabels():
        if label == x.get_text():
            angle_label += x.get_rotation()
        angle_label += ticklabel_add_angle
elif (self._axis_direction == "right" or self._axis_direction == "left"):
    for x in self.axes.get_yticklabels():
        if label == x.get_text():
            angle_label += x.get_rotation()
        angle_label += ticklabel_add_angle
angle_label += ticklabel_add_angle

if np.cos((angle_label - angle_normal)/180.*np.pi) < 0.:
Expand Down
2 changes: 1 addition & 1 deletion lib/mpl_toolkits/axisartist/axislines.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def new_floating_axis(self, nth_coord, value,
_helper = AxisArtistHelperRectlinear.Floating( \
axes, nth_coord, value, axis_direction)

axisline = AxisArtist(axes, _helper)
axisline = AxisArtist(axes, _helper, axis_direction=axis_direction)

axisline.line.set_clip_on(True)
axisline.line.set_clip_box(axisline.axes.bbox)
Expand Down