On 2014-03-24 14:08, Stan West wrote:
May I suggest that you look at the mailing list thread from that time
[1], try the patch in the thread, and see whether your issue is
resolved? This solution doesn't provide a work-around in your code,
but it may fix the problem at the root.
Paul, I just found the work-around that I used in my code. Define the
following function:
def set_spine_position(spine, position):
"""
Set the spine's position without resetting an associated axis.
As of matplotlib v. 1.0.0, if a spine has an associated axis, then
spine.set_position() calls axis.cla(), which resets locators,
formatters,
etc. We temporarily replace that call with axis.reset_ticks(), which is
sufficient for our purposes.
"""
axis = spine.axis
if axis is not None:
cla = axis.cla
axis.cla = axis.reset_ticks
spine.set_position(position)
if axis is not None:
axis.cla = cla
(The mention of v. 1.0.0 in the docstring is just the version I was
using at the time, not necessarily the earliest version with this
issue.) Then replace method calls like "spine.set_position(pos)" with
the function call "set_spine_position(spine, pos)". I hope this helps.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel