
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How to prevent numbers being changed to exponential form in Python Matplotlib?
Using style='plain' in the ticklabel_format() method, we can restrict the value being changed into exponential form.
Steps
Pass two lists to draw a line using plot() method.
Use ticklabel_format() method with style='plain'. If a parameter is not set, the corresponding property of the formatter is left unchanged. Style='plain' turns off scientific notation.
To show the figure, use plt.show() method.
Example
from matplotlib import pyplot as plt plt.plot([1, 2, 3, 4, 5], [11, 12, 13, 14, 15]) plt.ticklabel_format(style='plain') # to prevent scientific notation. plt.show()
Output
- Related Articles
- How to prevent form from being submitted?
- How to Prevent Twitter Accounts from being Hacked
- How to round exponential numbers in R?
- Negative 216 / 343, how to write in exponential form ?
- How to prevent raw rice from being destroyed by termites?
- How to find exponential value in Python?
- How to express the number16000 in exponential form in the easiest way?
- How to prevent multiple inserts when submitting a form in PHP?
- How to prevent a background process from being stopped after closing SSH client in Linux?
- Express each of the following numbers in exponential form:(1) 125 (2)243 (3)288
- WebGL: Prevent color buffer from being cleared in HTML5
- Explain exponential form of a number.
- How can I prevent a window from being resized with Tkinter?
- 1024 in exponential form is \( \ldots \ldots \ldots \)
- How to import Matplotlib in Python?

Advertisements