Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Don't draw axis (spines, ticks, labels) twice when using parasite axes.#11688

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 1 commit intomatplotlib:masterfromanntzer:axislines-draw-twice
Sep 23, 2018
Merged
Show file tree
Hide file tree
Changes fromall 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
5 changes: 5 additions & 0 deletionsdoc/users/next_whats_new/2018-07-18-AL.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
axes_grid1 and axisartist Axes no longer draw spines twice
``````````````````````````````````````````````````````````

Previously, spines of `axes_grid1` and `axisartist` Axes would be drawn twice,
leading to a "bold" appearance. This is no longer the case.
11 changes: 6 additions & 5 deletionsdoc/users/whats_new.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,12 +15,13 @@ revision, see the :ref:`github-stats`.
For a release, add a new section after this, then comment out the include
and toctree below by indenting them. Uncomment them after the release.

.. include:: next_whats_new/README.rst
.. toctree::
:glob:
:maxdepth: 1
.. include:: next_whats_new/README.rst

next_whats_new/*
.. toctree::
:glob:
:maxdepth: 1

next_whats_new/*

Ability to scale axis by a fixed order of magnitude
---------------------------------------------------
Expand Down
21 changes: 0 additions & 21 deletionslib/mpl_toolkits/axisartist/axislines.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -651,34 +651,13 @@ def new_fixed_axis(self, loc, offset=None):
)
return axis


def new_floating_axis(self, nth_coord, value, axis_direction="bottom"):
gh = self.get_grid_helper()
axis = gh.new_floating_axis(nth_coord, value,
axis_direction=axis_direction,
axes=self)
return axis

def draw(self, renderer, inframe=False):
if not self._axisline_on:
Copy link
Member

Choose a reason for hiding this comment

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

This is correctly handled inget_children

super().draw(renderer, inframe)
return
orig_artists = self.artists
self.artists = [
*self.artists, *self._axislines.values(), self.gridlines]
super().draw(renderer, inframe)
self.artists = orig_artists

def get_tightbbox(self, renderer, call_axes_locator=True):
bb0 = super().get_tightbbox(renderer, call_axes_locator)
if not self._axisline_on:
return bb0
bb = [bb0] + [axisline.get_tightbbox(renderer)
for axisline in self._axislines.values()
if axisline.get_visible()]
bbox = Bbox.union([b for b in bb if b and (b.width!=0 or b.height!=0)])
return bbox


Subplot = maxes.subplot_class_factory(Axes)

Expand Down
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

[8]ページ先頭

©2009-2025 Movatter.jp