plot=df.plot.pie(title="Colors",y='MATH',autopct='%1.1f%%')
fig = plot.get_figure()
fig.savefig("D:\\my_data\\output2.png")
With subplots=True
plot=df.plot.line(subplots=True)[0].get_figure()
plot.savefig('my_pic.jpg')
Plotting graphs using DataFrame
plot-line | Plotting line graph with different options |
plot-bar | Plotting bar graph with different options |
plot-barh | Plotting Horizontal bar graph with different options |
plot-hist | Histogram with different options |
plot-boxplot | boxplot with different options |
plot-pie | Pie diagram with different options |
plot-density | Density diagram with different options |
plot-area | Area diagram with different options |
plot-scatter | Scatter plot with different options |
Author
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.