
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Configure Behavior of the Qt4Agg Backend in Matplotlib
To configure the behaviour of the backend, we can use matplotlib.rcParams['backend'] with a new backend name.
Steps
Use get_backend() method to get the backend name.
Override the existing backend name using matplotlib.rcParams.
Use get_backend() method to get the configured backend name.
Example
import matplotlib backend = matplotlib.get_backend() print("The current backend name is: ", backend) matplotlib.rcParams['backend'] = 'TkAgg' backend = matplotlib.get_backend() print("Configured backend name is: ", backend)
Output
The current backend name is: GTK3Agg Configured backend name is: TkAgg
Advertisements