Up to this point, we've been exploring line graphs. However, using different types of plots alongside line graphs can provide a more complete understanding of the data.
Scatter plots highlight individual data points and show trends, clusters, or outliers that might be missed in a line graph.
Pie charts are also valuable for showing proportions within a whole, making them useful for visualizing percentage breakdowns or relative sizes of categories. While best for simple datasets with few categories, they can help viewers quickly grasp the composition of data in a visually intuitive way.
Bar charts are useful for comparing categories side by side, making it easier to see differences that could be overlooked in continuous line graphs.
Histograms help us understand the distribution of data, revealing whether it's skewed, uniform, or has a particular shape.
Additionally, heatmaps and other data maps can display relationships in a two-dimensional format with color intensity, which is useful for identifying patterns across multiple variables. By combining various types of plots, we can gain deeper insights and reveal aspects of the data that a single plot type might not fully capture.
Let's take a look at scatter plots and how they can be coded to highlight individual data points and show trends, clusters, or outliers.
1) Fill in the missing code to create the scatter plots.
2) Add grid lines to the graph.
plt.pie (data, labels)
Let's take a look at pie charts and how they can be coded to show proportions within a whole, making them useful for visualizing percentage breakdowns or relative sizes of categories.
1) Fill in the missing code to create the PIE CHART.
2) Add a Title.
plt.hist (data, bins)
Let's take a look at how to code a histogram to provide insights into the distribution of data.
1) Add the plot command to create a histogram of the scores with 10 bins.
2) Add the customization to your plot to include
Title:
Distribution of Exam Scores.
X label: Scores
Y label: Number of Students
plt.bar(x,height)
Let's learn how to code a bar chat to help compare data in categories (looking at them side-by-side) to see similarities and differences.
1) Fill in the missing code to create the BAR GRAPH.
2) Add the code to create the Title and the necessary Labels