-
Notifications
You must be signed in to change notification settings - Fork 6
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
Superfluous matplotlib figures shown #158
Comments
This is old behaviour - definitely using |
Nope, just the mandatory dependencies inc minimum versions listed in setup.py. Know what fixed this previously? Had a look for pertinent GH Issues but didn't find anything. NB continuous integration runs currently install MuMoT plus dependencies in a virtualenv using the package info in setup.py; I could change this to use conda but want the dependency info in setup.py to be right, as that defines what's absolutely required to get expected functionality. |
@joefresna @tbose1 do you recall? |
This is probably to do with the version of matplotlib, ipywidgets, or another of the libraries. @tbose1 is on holiday this week but I can talk to him next week about it when we're at the same conference, I hope. |
Yes, likely. I tried forcing matplotlib, ipywidgets and sympy versions in setup.py so they matched those in environment.yml but that didn't help. |
Running a build from today via MyBinder does not exhibit this problem, as far as I can see... |
MyBinder uses the conda |
The original double-figure problem was solved with commit 473e975 (committed on 3rd May 2018). I remember trying a lot of things.
This function replaced the previous version ( renamed to
|
@tbose1 Can you add a docstring for |
Added docstring to |
The environments created via pip and conda differ markedly in the library versions installed - not being expert in pip or conda I am not sure of how to ensure consistency - I have briefly tried downgrading matplotlib, ipython, and ipywidgets to the versions in |
Here's a maximal working |
I'm a bit confused now - is |
I've found the old issue this cropped up in (#108)
@willfurnass it seems we're just chasing our tails now trying to get virtualenv working - you said you could change the continuous integration to work with conda - I think we should do that and only support conda installation at this point. |
I've noticed something else - in the virtualenv installation figures are no longer in interactive mode (pannable, etc.) - this may be related - have tried installing ipympl and using the |
Having checked the conda installation and MyBinder deployment too, both work in interactive mode for plots correctly - by contrast the virtualenv approach does not, and I think this is the root of this issue. It seems that virtualenvs may not play nicely with matplotlib, e.g. see https://matplotlib.org/faq/virtualenv_faq.html (although not sure when that was written) - I recommend we only support the conda installation route and change the continuous integration over to use this @willfurnass |
Addressed by #210 |
Installation of MuMoT within the |
Update: pinning |
Solved with commit 97e1074. Added the following to the MuMoT code (chooses TkAgg backend if mac-user): if sys.platform == "darwin": #if operating system is macOS |
@tbose1 I suggest also adding comments above those three lines to explain why they're needed. |
Added comments via 6d9520c. |
Various statements in the MuMoTtest.ipynb Notebook result in bare, superfluous Figure objects being displayed before the Figures that those statements should produce. An example statement is:
Could there be a superfluous call to
matplotlib.pyplot.figure()
somewhere?More info:
Noticed using commit af774f5
The text was updated successfully, but these errors were encountered: