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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
