question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spyder is not plotting graph

See original GitHub issue

Issue 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 (or pip, 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:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ShubhangJanicommented, Apr 8, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found