Skip to content
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

Inset axes #73

Merged
merged 7 commits into from Oct 2, 2019
Merged

Inset axes #73

merged 7 commits into from Oct 2, 2019

Conversation

anekimken
Copy link
Contributor

I added an option to specify existing axes for the new plots to go in. Most of the changes are in plotter.py. When the user specifies the axes using the parameter ax=my_ax, the rawdata plot is created in those axes, and the contrast plot is created as an inset axes next to those axes. This avoid creating an entirely new set of axes, since the inset is connected to the original axes.

I did my best to maintain the spacing of the plots as best I understand them, but sometimes matplotlib spacing seems like wizardry to me, so I may have overlooked something.

I also modified one of the tests in the plotting test file and created a new test file. In my hands, the new code passes the existing tests, although it does throw a warning related to a DeprecationWarning for something that will change in python 3.8. Looks like this is only a problem in matplotlib 3.0, and it gets fixed in matplotlib 3.1.

For users who don't use this option, nothing should change. For users who do, the rawdata axes are not necessarily accessible using FigName.axes[0] because the specified axes might have a different index. The contrast axes can be accessed using ax.contrast_axes where ax is the specified axes.

@josesho josesho added this to the v0.2.6 milestone Oct 2, 2019
@josesho josesho changed the base branch from master to v0.2.6 October 2, 2019 02:18
@josesho josesho merged commit 2c2d759 into ACCLAB:v0.2.6 Oct 2, 2019
@josesho
Copy link
Member

josesho commented Oct 2, 2019

Looks good. Will merge into the 0.2.6 dev branch.

This was referenced Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants