What solved the problem for me was to restart my kernel, import the following first:
import matplotlib
matplotlib.use('TKAgg')
Then,
import matplotlib.pyplot as plt
You probably imported matplotlib with another framework before you tried to change to TKAgg
. Restart your kernel.
More Related Contents:
- How to plot multiple Seaborn Jointplot in Subplot
- FutureWarning: elementwise comparison failed; returning scalar, but in the future will perform elementwise comparison
- Matplotlib: Specify format of floats for tick labels
- How to draw a line with matplotlib?
- warning about too many open figures
- matplotlib: plot multiple columns of pandas data frame on the bar chart
- cx_Freeze converted GUI-app (tkinter) crashes after pressing plot button
- How to remove or hide x-axis labels from a seaborn / matplotlib plot
- Add Legend to Seaborn point plot
- Specify format of floats for tick labels
- No outlines on bins of Matplotlib histograms or Seaborn distplots
- Plot two levels of x_ticklabels on a pandas multi-index dataframe [duplicate]
- Python making combined bar and line plot with secondary y-axis
- Matplotlib FuncAnimation: How to gray out previous trajectory of in 3D pixel tracking?
- Image is not displaying in Google Colab while using imshow()
- Multiple lines of x tick labels in matplotlib
- Using Sympy Equations for Plotting
- Interactive matplotlib figures in Google Colab
- pandas scatter plotting datetime
- Python – concatenate NoneType and string in a new list
- What’s the correct way to convert bytes to a hex string in Python 3?
- multiple axis in matplotlib with different scales [duplicate]
- Python webbrowser.open() to open Chrome browser
- Beautiful Soup findAll doesn’t find them all
- What is __pycache__?
- networkx – change color/width according to edge attributes – inconsistent result
- How to use custom png image marker with plot?
- Modify the legend of pandas bar plot
- Error while downloading the requirements using pip install (setup command: use_2to3 is invalid.)
- Python 3 chokes on CP-1252/ANSI reading