Skip to content

Commit 5c784a8

Browse files
Adjust code to match line length
1 parent b967bdc commit 5c784a8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/gallery/maps/choropleth_map.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# The dataset contains different attributes, here we focus on the population within
2424
# the different countries (column "POP_EST") for the continent "Africa".
2525
world["POP_EST"] *= 1e-6
26-
world_africa = world[world["CONTINENT"] == "Africa"].copy()
26+
africa = world[world["CONTINENT"] == "Africa"].copy()
2727

2828
fig = pygmt.Figure()
2929
fig.basemap(region=[-19.5, 53, -37.5, 38], projection="M10c", frame="+n")
@@ -33,11 +33,9 @@
3333

3434
# Next, we plot the polygons and fill them using the defined colormap. The target column
3535
# is defined by the aspatial parameter.
36-
fig.plot(data=world_africa, pen="0.8p,gray50", fill="+z", cmap=True, aspatial="Z=POP_EST")
36+
fig.plot(data=africa, pen="0.8p,gray50", fill="+z", cmap=True, aspatial="Z=POP_EST")
3737

3838
# Add colorbar legend.
39-
fig.colorbar(
40-
frame="x10f5+lPopulation (millions)", position="jML+o2c/-2.5c+w5c+ef0.2c+ml"
41-
)
39+
fig.colorbar(frame="x+lPopulation (millions)", position="jML+o2c/-2.5c+w5c+ef0.2c+ml")
4240

4341
fig.show()

0 commit comments

Comments
 (0)