Skip to content
Programs · Program 4-17
Q.

(Program 4-17) Consider the dataset of Table 4.10 showing the forest cover of north eastern states that contains geographical area and corresponding forest cover in sq km along with the names of the corresponding states.

Table 4.10 -- forest cover of north eastern states:

StateGeoAreaForestCover
Arunachal Pradesh8374367353
Assam7843827692
Manipur2232717280
Meghalaya2242917321
Mizoram2108119240
Nagaland1657913464
Tripura104868073
Plot a pie chart of the ForestCover column with the title 'Forest cover of North Eastern states' and legend turned off.
Punjab PsebTextbookSubjective· 3mImportance★★★★★est
45% · 20/44 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

A pie chart is the wrong choice for this data — it has too many categories (7 states) for a pie chart to be readable. The correct approach is to plot it as asked, but understand why a bar chart would be better.

This is a code task — you need to write Python code using matplotlib to produce the specified pie chart from the given data.

Why a pie chart here is problematic

Pie charts work well for 2–5 categories where you want to show proportions of a whole. With 7 states, the slices become too small to distinguish, and comparing areas like Manipur (17280) vs Meghalaya (17321) is nearly impossible by eye. A bar chart would let you compare absolute values easily. But the question explicitly asks for a pie chart, so we follow instructions while noting the limitation.

The data

From Table 4.10:

StateGeoArea (sq km)ForestCover (sq km)
Arunachal Pradesh8374367353
Assam7843827692
Manipur2232717280
Meghalaya2242917321
Mizoram2108119240
Nagaland1657913464
Tripura104868073

We only need the State and ForestCover columns for the pie chart.

The code

import matplotlib.pyplot as plt

# Data
states = ['Arunachal Pradesh', 'Assam', 'Manipur', 'Meghalaya', 'Mizoram', 'Nagaland', 'Tripura']
forest_cover = [67353, 27692, 17280, 17321, 19240, 13464, 8073]

# Create pie chart
plt.figure(figsize=(8, 6))
plt.pie(forest_cover, labels=states, autopct='%1.1f%%')
plt.title('Forest cover of North Eastern states')
plt.legend().remove()  # Turn off legend
plt.show()

Key lines explained

  • plt.pie(forest_cover, labels=states, autopct='%1.1f%%') — The first argument is the data values. labels gives each slice a name. autopct adds percentage labels on each slice, formatted to one decimal place. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.