SubplotBase._make_twin_axes always creates a new subplot instance #1972

Merged
merged 2 commits into from May 3, 2013

3 participants

@mdboom
Matplotlib Developers member

This is an alternative to #1969 that is based on v1.2.x and includes the test from #1957.

@pelson pelson commented on an outdated diff May 3, 2013
lib/matplotlib/tests/test_axes.py
@@ -1090,3 +1090,50 @@ def test_mixed_collection():
ax.set_xlim(0, 16)
ax.set_ylim(0, 16)
+
+
+@image_comparison(baseline_images=['twin_spines'], remove_text=True,
+ extensions=['png'])
+def test_twin_spines():
+
+ def make_patch_spines_invisible(ax):
+ ax.set_frame_on(True)
+ ax.patch.set_visible(False)
+ for sp in ax.spines.itervalues():
+ sp.set_visible(False)
+
+ fig = plt.figure()
@pelson
Matplotlib Developers member
pelson added a note May 3, 2013

Given how little detail is needed in the plot, I'm tempted to suggest reducing the PNG size with a combination of dpi and figsize. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mdboom
Matplotlib Developers member

@pelson: Sure, I've shrunk the figure.

@mdboom mdboom merged commit 1909fef into matplotlib:v1.2.x May 3, 2013
@pelson
Matplotlib Developers member

@pelson: Sure, I've shrunk the figure.

Thanks @mdboom. Good stuff 😄

@mdboom mdboom deleted the mdboom:twin-spine-fix branch Aug 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment