spyder is not plotting graph
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder(orpip, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset - Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
What steps reproduce the problem?
What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)
PASTE TRACEBACK HERE
Versions
- Spyder version:
- Python version:
- Qt version:
- PyQt version:
- Operating System name/version:
Dependencies
PASTE DEPENDENCIES HERE
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Spyder 4 is not displaying plots and displays message like this ...
Figures now render in the Plots pane by default. To make them also appear inline in the Console, uncheck "Mute Inline Plotting" under...
Read more >Spyder is not displaying Matplotlib Plot inline #14723 - GitHub
Not able to display Matplotlib plot inline in Spyder. What steps reproduce the problem? Running the follow ing Python program in Spyder: """...
Read more >Plots — Spyder 5 documentation
The Mute inline plotting option is enabled by default, preventing your plots from appearing in the Console. If you deactivate this option, figures...
Read more >Plotting with Matplotlib - Geo-Python
Start by opening the Spyder preferences. Mac users can go to python -> Preferences… in the menubar · In the Preferences window, click...
Read more >matplotlib the Matrix Plotting Library for Python (Spyder 5 IDE)
When using matplotlib, typically the pyplot module is used, an abbreviation for Python plot. This guide will first explore the basics of ...
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 Free
Top 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

@hubertmucha Hello. I actually figured out the solution (at least from my problem). I was performing K-Nearest Neighbors when doing mine. In my code, my step value was really really small (causing the IDE to crash due to the intense specificity. My step was 0.0001. If you use step = 0.01, it should work for you:
x1, x2 = np.meshgrid(np.arange(start = x_set[:, 0].min() - 1, stop = x_set[:, 0].max() + 1, step = 0.01), np.arange(start = x_set[:, 1].min() - 1, stop = x_set[:, 1].max() + 1, step = 0.01)) plt.contourf(x1, x2, classifier.predict(np.array([x1.ravel(), x2.ravel()]).T).reshape(x1.shape), alpha = 0.75, cmap = ListedColormap((‘red’, ‘green’)))
If you are using Kernel SVM polynomial type, make sure you decrease your degree value.
I think you will find the answer here https://stackoverflow.com/questions/32774520/why-matplotlib-give-the-error-matplotlib-lines-line2d-object-at-0x0392a9d0