हिंदी

What effect did ‘legend=False’ in the program have on the output? import pandas as pd import matplotlib.pyplot as plt df=pd.DataFrame({'GeoArea':[83743,78438,22327,22429,21081,16579,10486]

Advertisements
Advertisements

प्रश्न

What effect did ‘legend=False’ in the program have on the output?

import pandas as pd
import matplotlib.pyplot as plt
df=pd.DataFrame({'GeoArea':[83743,78438,22327,22429,21081,16579,10486]
     ,'ForestCover':[67353,27692,17280,17321,19240,13464,8073]},
      index=['Arunachal Pradesh','Assam','Manipur','Meghalaya'
    ,'Mizoram','Nagaland','Tripura'])
df.plot(kind='pie',y='ForestCover',title='Forest cover of North Eastern
states',legend=False)
plt.show()
अति संक्षिप्त उत्तर
Advertisements

उत्तर

legend=False removes the legend from the pie chart output. Therefore, no legend is displayed in the graph, making the chart appear without a legend box.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 4: Plotting Data using Matplotlib - Intext Questions [पृष्ठ १३२]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 12
अध्याय 4 Plotting Data using Matplotlib
Intext Questions | Q 8. | पृष्ठ १३२
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×