Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
[SPRINT] Refactored the axes module to split it in smaller chunks.#1931
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Woah, I thought that splitting a class wasn't possible in Python. I suppose that's because I had never really utilised relative imports to their full potential. Thanks for this work,@NelleV. |
def update_params(self): | ||
"""update the subplot position from fig.subplotpars""" | ||
self.figbox, self.rowNum, self.colNum, self.numRows, self.numCols = \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I presume you did a copy and paste fromaxes.py
. There's a lingering trailing backslash here. I'm not sure if this PR is the right place to deal with PEP8 issues that linger from the old setup. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not sure. Maybe once the restructuring is completely done. I think there's still a lot of work to do on this PR.
I'm not able to reproduce the failing tests on py3k. |
Great work Nelle. I'm going to do some playing locally with the OO interface just to make sure I can create different types of Axes objects. I'm going to trust you thatall the subplotting stuff was ported over correctly. |
I looked at --- before.rst 2013-06-29 11:01:12.000000000 -0500+++ after.rst 2013-06-29 11:03:11.000000000 -0500@@ -25,24 +25,20 @@ _iii _oh _sh-allow_rasterization cbook division docstring exit-font_manager get_ipython help is_sequence_of_strings is_string_like-itemgetter iterable itertools ma martist math matplotlib-maxis mcoll mcolors mcontour@@ -54,8 +50,6 @@ mpatches mpath mquiver-mscale-mspines mstack mstream mtable |
Most of these are other matplotlib's module, and some ipython specific stuff. Two functions are "missing" (they are both from the cbook module):
|
I've also constructed an importmatplotlibmatplotlib.use('pdf')frommatplotlib.figureimportFigurefrommatplotlib.backends.backend_pdfimportFigureCanvasPdfasfigcanfig=Figure()can=figcan(fig)ax=fig.add_axes([0.1,0.1,0.8,0.8])ax.plot([1,2,3])fig.savefig('asdf.pdf') 3D axes also works using the usual Notice the |
I've documented the changes in the namespace of the axes module. I think this is ready to be merged. |
Thanks@NelleV. I think anybody relying on, for example, I'm going to merge this now. We should be aware of possible issues, but I think we've done the right thing here. |
[SPRINT] Refactored the axes module to split it in smaller chunks.
Merged. With much trepidation. |
This PR is work in progress.
I've started refactoring the axes module to split it into several files. In this PR, I've split the axes 9kloc module, into 3 submodules:
This may not be the best way to split the axes module: feedback is welcome.
These changes are completely backward compatible, except for private methods, that are not accessible from the axes module anymore.