Plotting, GUI and Databases
Plotting Matplotlib is a Python library for data visualization . It helps you create charts, graphs, and plots to better understand and present data. You can use it to draw: Line charts Bar charts Pie charts Scatter plots Histograms First, we have to import matplotlib. import matplotlib.pyplot as plt Here, matplotlib → main library pyplot → module that contains functions for creating plots pyplot provides a state-based interface — it keeps track of the current figure and axes, so you can create and modify plots easily with simple function calls. Commonly Used pyplot Functions: Function Description plt.plot() Draws line plots plt.scatter() Creates scatter plots plt.bar() Creates bar charts plt.hist() Plots histograms plt.pie() Creates pie charts plt.title() Adds a title to the plot plt.xlabel() / plt.ylabel() Labels axes plt.legend() Adds a legend plt.grid() Adds a grid plt.show() Displays the plot 1️⃣ Li...