Four Charts

Four Charts: Line Charts: Change Over Time, Bar Charts: Comparing Categories, Scatter Plots: Do Two Things Move Together?, Histograms: How Values Are Spread.

Updated

  1. Line Charts: Change Over Time (Apprentice): A line chart shows how a value changed over time, so dates go along the x-axis, a marker shows each measurement, fig.autofmt_xdate() keeps the dates readable, and two lines on one Axes, each with a label= and ax.legend(), compare two groups over the same months.
  2. Bar Charts: Comparing Categories (Apprentice): A bar chart draws one bar for each category with its height as the amount, so ax.bar compares groups such as flavors, sorting the table first puts the biggest bar first, ax.barh lays long names out sideways, and ax.bar_label writes each bar's number on it.
  3. Scatter Plots: Do Two Things Move Together? (Journeyman): A scatter plot puts one dot for each row at its two measurements, so ax.scatter shows whether two columns move together, alpha shows where the dots crowd, a correlation from -1 to 1 puts the pattern into one number, and two things moving together never proves that one causes the other.
  4. Histograms: How Values Are Spread (Journeyman): A histogram splits a column of numbers into ranges called bins and draws one bar for how many values fall in each, so ax.hist shows a column's shape, bins sets how many ranges (or exactly where they start and end), and the shape is described in plain words, such as most orders small and a few large.