- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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 do I change the font size of the scale in Matplotlib plots?
To change the font size of the scale in Matplotlib, we can use labelsize in the tick_params() method.
Steps
- Set the figure size and adjust the padding between and around the subplots.
- Create a figure and a set of subplots.
- Plot x data points using plot() method.
- To change the font size of the scale in matplotlib, we can use labelsize in the ticks_params()method.
- To display the figure, use show() method.
Example
import numpy as np from matplotlib import pyplot as plt plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True fig, ax = plt.subplots() x = np.random.rand(10) ax.plot(x) ax.tick_params(axis='x', labelsize=20) plt.show()
Output
- Related Articles
- How do I change the font size of ticks of matplotlib.pyplot.colorbar.ColorbarBase?
- How can I change the font size of ticks of axes object in Matplotlib?
- How to change the font size of scientific notation in Matplotlib?
- How can I change the font family and font size with jQuery?
- How to change xticks font size in a matplotlib plot?
- How do I change the axis tick font in a Matplotlib plot when rendering using LaTeX?
- How do you change the default font color for all text in Matplotlib?
- How to change the font size of textView in android?
- How to modify the font size in Matplotlib-venn?
- How to set the font size of Matplotlib axis Legend?
- How to change the font size of Text using FabricJS?
- How to change the size of plots arranged using grid.arrange in R?
- How do I get interactive plots again in Spyder/Ipython/matplotlib?
- How to change the scale of an existing table in Matplotlib?
- How to change font size in HTML?

Advertisements