model.plot() not working
See original GitHub issueNot sure if this is an actual issue or if I am doing something wrong, but I can’t seem to get model.plot() working.
I have the following code, where the times and years variables contain some olympic data.
kernel = GPy.kern.rbf(1, variance=1, lengthscale=1)
model = GPy.models.GPRegression(times, years, kernel)
model.plot()
A separate window which should contain the plot does open, but closes instantly, without displaying anything.
Any ideas as to why this is happening?
Issue Analytics
- State:
- Created 10 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Issue with plot_model in keras and pydot - Stack Overflow
I solved it with. sudo apt-get install graphviz.
Read more >Resolved: Matplotlib figures not showing up or displaying
In this blog post I detailed how to resolve a pesky issue where matplotlib figures are not displayed to your screen. Symptoms of...
Read more >How to use plot model in keras? - Data Science Stack Exchange
I'm trying to draw the keras model with the plotmodel. ... You must install pydot and graphviz for pydotprint to work.
Read more >Pyplot tutorial — Matplotlib 3.6.2 documentation
Working with multiple figures and axes#. MATLAB, and pyplot , have the concept of the current figure and the current axes. All plotting...
Read more >6 Work with models - Data Visualization
The geom_smooth() function can take a range of method arguments to fit LOESS, OLS, ... The result is a single plot containing not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue. The fix: matplotlib.pylab.show(block=True) Worked fine and the above explanation is a valid one.
Too bad I had to google to find this issue as the documentation does not work outside of ipython.
Plotting in matplotlib is a daemon task. Thus, when the plot shows up, it gets drawn, but the main python process is done. This makes the program (python process) stop.
You need to stop the python program to close. The block=True argument does exactly that. ipython does it as well. That is why your code behaved as it did.