Advertisements
Advertisements
प्रश्न
On providing a single list or array to the plot() function, can matplotlib generate values for both the x and y axiz?
लघु उत्तर
Advertisements
उत्तर
- Yes, when only a single list or array is provided to the plot() function, Matplotlib automatically generates the values for the x-axis.
- The given list values are taken as y-axis values, and the x-axis values are generated automatically starting from 0.
import matplotlib.pyplot as plt
plt.plot([10, 20, 30, 40])
plt.show()shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
