- 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 display Matplotlib Y-axis range using absolute values rather than offset values?
To display Y-axis range using absolute values rather than offset values, we can take the following steps −
Create x_data and y_data data points in the range of 100 to 1000.
Create a figure and a set of subplots using subplots() method.
Plot x_data and y_data using plot() method.
If a parameter is not set, the corresponding property of the formatter is left unchanged using ticklabel_format() method with useOffset=False.
To display the figure, use show() method.
Example
from matplotlib import pyplot as plt plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True x_date = range(100, 1000, 100) y_data = range(100, 1000, 100) fig, ax = plt.subplots() ax.plot(x_date, y_data) ax.ticklabel_format(useOffset=False) plt.show()
Output
- Related Articles
- How to specify values on Y-axis in Python Matplotlib?
- How to replace auto-labelled relative values by absolute values in Matplotlib?
- Updating the X-axis values using Matplotlib animation
- How to set the range of Y-axis for a Seaborn boxplot using Matplotlib?
- How to display all label values in Matplotlib?
- How to set X-axis values in Matplotlib Python?
- How to change the range of the X-axis and Y-axis in Matplotlib?
- How to enforce axis range in Matplotlib?
- Change values on matplotlib imshow() graph axis
- Hide axis values but keep axis tick labels in matplotlib
- How to change the Y-axis values in a bar plot using ggplot2 in R?
- How to create a histogram with Y-axis values as count using ggplot2 in R?
- How to represent all values of X-axis or Y-axis on the graph in R using ggplot2 package?
- How to force Matplotlib to show the values on X-axis as integers?
- How to display 0 at Y-axis using ggplot2 in R?

Advertisements