Read it in the data
Country | Continent | GDP_per_capita | life_expectancy | Population | |
---|---|---|---|---|---|
0 | Afghanistan | Asia | 663 | 54.863 | 22856302 |
1 | Albania | Europe | 4195 | 74.200 | 3071856 |
2 | Algeria | Africa | 5098 | 68.963 | 30533827 |
3 | Angola | Africa | 2446 | 45.234 | 13926373 |
4 | Antigua and Barbuda | N. America | 12738 | 73.544 | 77656 |
Change the background color
You can change the background color with ax.set_axis_bgcolor
, but it will only
change the area inside of the plot. This is useful when you have multiple
plots in the same figure (a.k.a. multiple charts in the same image) but most of
the time is just a headache.
Actually, really change all of the background color
In order to change the background color of everything, you need to create a
figure and set the facecolor
. On top of that, you need to specify the
facecolor when you save, or else it will show up as white/transparent in Adobe
Illustrator even though it looks right in the Python world.