Page 297 - AI_Ver_3.0_class_11
P. 297
# Display the plot
plt.show()
Output:
In the above program the following attributes have been used:
• linewidth - the width of the line
• linestyle - the style of line i.e. solid, dashed, dot, dashdot marker, markersize, and
markeredgecolor - sets the marker’s shape, size and marker edge colour, respectively
• marker - sets the marker style for the data points
• markersize - sets the size of the markers
• color - sets the colour of the line
• label - sets the label for the line plot
Bar Graph
A bar graph, sometimes referred to as a horizontal column chart, is well-liked for a reason that it swiftly visualises
data sets and is easy on the eyes to visualise. You can rapidly determine which bar is the highest or lowest as well as
the incremental changes between bars. The bar graph is best suited to represent categorical data. For example:
Food Pizza Pasta Dosa Chowmein Burger Momos
People 35 30 5 25 40 15
Data Literacy—Data Collection to Data Analysis 295

