Class 7 · CBSE AI · Strand B — Python for AI

Data visualisation with matplotlib for beginners — Class 7

A chart turns numbers into a pattern your eyes read instantly. Plotting your first graph in Python. For Class 7.

What this concept actually says

  • A chart translates numbers into a visual pattern that humans process faster than tables
  • Choosing the wrong chart type can actively mislead — chart choice is a reasoning decision, not an aesthetic one
  • matplotlib is the foundational Python visualisation library; most other tools build on top of it

An analogy your child will recognise

Weather map vs. weather data table

A table of temperature readings across India is precise but you cannot see which regions are hot at a glance. A weather map colours regions by temperature and you instantly know 'Rajasthan is hottest'. matplotlib does the same — it turns your numbers into a map your brain can read in seconds.

Cricket scorecard vs. run-rate graph

A scorecard gives you exact runs per over. A run-rate graph shows the momentum visually — you can see instantly when a team accelerated or collapsed. Both are needed: the graph for narrative, the table for verification.

Common misconceptions to watch for

  • A pie chart is the best way to show proportions — in reality, humans are poor at comparing angles; a bar chart almost always communicates proportions more clearly
  • More colours and effects make a chart more informative — in reality, the principle of data-ink ratio says every visual element should carry information or be removed

Key facts in one breath

  • matplotlib was created in 2003 to mimic MATLAB's plotting functions for Python
  • The three most common chart types for data analysis are: histogram (distribution), bar chart (comparison), and scatter plot (relationship between two variables)
  • Always label axes and add a title — a chart without labels is not a finished product
  • plt.show() is required to display a chart in some environments; in Colab, it is often automatic but good practice to include it

How Dhee Learning teaches this — the 3-stage question loop

Every Dhee Learning session for this concept follows three stages. We share the questions Dhee actually asks, so you can hear what a session sounds like.

Stage 1 — Surface

You have a table of 200 student scores. You could share the table or share a chart. When would a chart actually be worse than the table?

Rote answer

"A chart is better because it is visual"

Understood

"A chart is better for seeing patterns and trends across many values, but worse if someone needs the exact score of one specific student — charts lose precision to gain overview"

Stage 2 — Reasoning

You want to show the distribution of exam scores in a class. Your friend wants to use a line chart. You think a histogram is better. Who is right, and why?

Follow-up Dhee may use: What would a bar chart show that a histogram would not, if you had scores for five different classes?

Stage 3 — Application

Using your loaded DataFrame from last session, create two charts: one that shows a distribution and one that shows a comparison. Label your axes. What is the most important thing each chart tells you that the raw numbers did not?

Misconception Dhee watches for: Making the chart look impressive (3D, many colours) rather than making the insight clear — visual complexity often reduces comprehension

Related concepts

Want your child to actually understand this?

Dhee turns this concept into a 15-minute spoken session — asking, listening, and probing — so your child builds the idea themselves.

Frequently asked questions

What is data visualisation with matplotlib — explained for kids? +

A chart turns numbers into a pattern your eyes read instantly. Plotting your first graph in Python. For Class 7.

What's the most common mistake children make about this concept? +

A pie chart is the best way to show proportions — in reality, humans are poor at comparing angles; a bar chart almost always communicates proportions more clearly

How does Dhee Learning teach this in a Class 7 session? +

Dhee opens with a question — for example: "You have a table of 200 student scores. You could share the table or share a chart. When would a chart actually be worse than the table?" — listens to your child's answer, then probes the reasoning behind it. The session ends when the child can apply the idea to a brand-new situation, not just recall it.