Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
Plot yscale class linear, log, logit and symlog by name in Matplotlib?
To plot yscale with class by name, we can take the following steps
- Set the figure size and adjust the padding between and around the subplots.
- Create y data points using numpy.
- Create x data points using numpy.
- Add a subplot to the current figure at index 1.
- Plot x and y data points using plot() method.
- For linear class by name, use yscale("linear") method.
- Set the title of the current subplot.Repeat the steps from 4 to 5 with different indices, yscale() class by name, and title of the plot.
- To display the figure, use show() method.
Example
import numpy as np import matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True y = np.random.normal(loc=0.5, scale=0.4, size=1000) y = y[(y > 0) & (yOutput
Advertisements

