O'Reilly logo

Learning Python Data Visualization by Chad Adams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Parameters

We have seen parameters used in our pygal-related chapters throughout the book. Here, we will start with our regions-based France chart, but first let's go ahead and fill in the rest of the regions on the chart. Copy the following code into your editor of choice and render the chart:

# -*- coding: utf-8 -*- import pygal france_chart = pygal.FrenchMap_Regions() france_chart.title = 'Sample Regions' france_chart.add('Alsace', ['42']) france_chart.add('Aquitaine', ['72']) france_chart.add('Auvergne', ['83']) france_chart.add('Brittany', ['53']) france_chart.add('Burgundy', ['26']) france_chart.add('Centre', ['24']) france_chart.add('Champagne-Ardenne', ['21']) france_chart.add(unicode('Franche-Comté', 'utf-8'), ['43']) france_chart.add(unicode('Île-de-France', ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required