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

Appearance settings

Single axes artist #3835

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 4 commits into from
Dec 13, 2014
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
MNT : tweak how internals of Axes.plot work
The actual processing and artist creation in Axes.plot happens through
the `__call__` method on a _process_plot_var_args instance hanging off
the Axes object.  The _process_plot_var_args knows what axes it is
hanging off of and passed that into the Line2D artists as a kwarg at
creation time, which sets the axes of the Line2D.  The axes of the Line2D
is set again during the `Axes.add_line` method.  For the most part this
is fine, if un-needed, because the axes is the same objects both time
it is set.  However when using the mpl_toolkit, Axes objects get wrapped
in not-strictly-subclassed objects and the Axes object that the
_process_plot_var_args object knows about is not the Axes object that
add_line is called on which now results in an exception as it is moving
artists between axes.
  • Loading branch information
tacaswell committed Dec 12, 2014
commit 69decec0297f5693303297800e5e05252b4663f9
1 change: 0 additions & 1 deletion 1 lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ def _makeline(self, x, y, kw, kwargs):
# (can't use setdefault because it always evaluates
# its second argument)
seg = mlines.Line2D(x, y,
axes=self.axes,
**kw
)
self.set_lineprops(seg, **kwargs)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.