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

PersistenceLength.plot() create new axes instead of grabbing current ones #2590

Closed
lilyminium opened this issue Mar 7, 2020 · 1 comment · Fixed by #2591
Closed

PersistenceLength.plot() create new axes instead of grabbing current ones #2590

lilyminium opened this issue Mar 7, 2020 · 1 comment · Fixed by #2591

Comments

@lilyminium
Copy link
Member

Is your feature request related to a problem?

Because PersistenceLength.plot() grabs the current axes instead of creating a new figure, you can end up with it plotting over something else unintentionally. e.g. plotting over and over in this figure

if ax is None:
ax = plt.gca()

Describe the solution you'd like

Create new axes instead. If users want to plot on already created axes, they can pass those in themselves with the ax keyword already implemented.

@ss62171
Copy link
Contributor

ss62171 commented Mar 7, 2020

@lilyminium is this fine?

lilyminium pushed a commit that referenced this issue Mar 21, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
* Fixes #2590
* Created new axes for plot of persistence_length if ax is not passed in as an argument (analysis/polymer.py)
* Added test (analysis/test_persistencelength.py)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants