- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 to change backends in Matplotlib?
We can override the backend value using atplotlib.rcParams['backend'] variable.
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 Enter number of bars: 5
- Related Articles
- How to change fonts in matplotlib (python)?
- How to change axes background color in Matplotlib?
- How to change the legend fontname in Matplotlib?
- How to change the curve using radiobuttons in Matplotlib?
- How to change the spacing between ticks in Matplotlib?
- How to change the strength of antialiasing in Matplotlib?
- How to change Bar Chart values to percentages in Matplotlib?
- How to change the linewidth of a hatch in Matplotlib?
- How to change the marker size with pandas.plot() in Matplotlib?
- How to change the figuresize using Seaborn factorplot in Matplotlib?
- How to change xticks font size in a matplotlib plot?
- How to change the font size of scientific notation in Matplotlib?
- How to change the scale of an existing table in Matplotlib?
- How to change the color of a plot frame in Matplotlib?
- How to change the plot line color from blue to black in Matplotlib?

Advertisements