1

I have a geodataframe that I'm trying to plot.

With no args it happily plots this:

enter image description here

But when I try this gp_aircon_df.geometry.plot(column="coolingHours", cmap='spring'); I get:

TypeError: There is no Line2D property "column"

The df is really simple:

    coolingHours  geometry
0   5377          POLYGON ((130.834539712 -12.45798405399995, 13...
1   5377          POLYGON ((130.8471142530001 -12.37754403699995...
.
.

Any idea what's going on?

(It's not this problem)

Ben
  • 12,614
  • 4
  • 37
  • 69

1 Answers1

1

Try defining the arguments to .geometry.plot() as a dictionary first. eg:

ch = dict(column="coolingHours", colormap = "spring")
gp_aircon_df.geometry.plot(**ch)

Choropleth example image

tomwyb
  • 26
  • 3