

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can I set the 'backend' in matplotlib in Python?
We can use matplotlib.rcParams['backend'] to override the backend value.
Steps
Using get_backend() method, return the name of the current backend, i.e., default name.
Now override the backend name.
Using get_backend() method, return the name of the current backend, i.e., updated name.
Example
import matplotlib print("Before, Backend used by matplotlib is: ", matplotlib.get_backend()) matplotlib.rcParams['backend'] = 'TkAgg' print("After, Backend used by matplotlib is: ", matplotlib.get_backend())
Output
Before, Backend used by matplotlib is: GTK3Agg After, Backend used by matplotlib is: TkAgg
- Related Questions & Answers
- How do I configure the behavior of the Qt4Agg backend in Matplotlib?
- How can I set the location of minor ticks in Matplotlib?
- How can I plot a single point in Matplotlib Python?
- How can I render 3D histograms in Python using Matplotlib?
- How can I hide the axes in Matplotlib 3D?
- How can I manually set proxy settings in Python Selenium?
- How can I show figures separately in Matplotlib?
- How can I plot hysteresis threshold in Matplotlib?
- Matplotlib Backend Differences between Agg and Cairo
- How can I view the indexes I have set up in MySQL?
- How do I set color to Rectangle in Matplotlib?
- How can I set the row height in Tkinter TreeView?
- How can I get the color of the last figure in Matplotlib?
- How to check that pylab backend of Matplotlib runs inline?
- How can I plot a confusion matrix in matplotlib?
Advertisements