My question has overlap with Changing colours in GeoPandas?, but unfortunately still unanswered: I want to plot a multiline shapefile in 1 color.

import geopandas as gpd
multiline_example = gpd.read_file('multiline_example_filepath.shp')

This works fine so far, except that the lines have multiple random colors:

Plot with random colors

Now I simply want to assign 1 color for all lines. Is this possible, and if so, how?

What I found so far:

On the GeoPandas site, some plotting-examples are given (http://geopandas.readthedocs.io/en/latest/mapping.html). Here, they simply use


However, if I try this, I get the following error:

TypeError: plot_dataframe() got an unexpected keyword argument 'color'

Why doesn't this work?

I have been able to choose a column (where the color is dependent on the column values), as well as a colormap, but the results are still different colors for different lines.

multiline_example.plot(colormap = 'Greens')
multiline_example.plot(column = 'a_column_name')

Simply by updating from GeoPandas 0.1.1 to 0.3.0.


works fine now.

  • 1
    what is your geopandas version ?
    – Delforge
    Nov 21, 2017 at 11:57
  • That's a good question, I get where things went wrong now.. For some reason I had installed geopandas version 0.1.1. After updating to 0.3.0, everything worked fine. Sorry for bad research from my side, thanks for the clarifying question. Nov 22, 2017 at 19:49

1 Answer 1


Try creating your own color map with matplotlib:

from matplotlib.colors import ListedColormap

cmap = ListedColormap(['red'], name='allred')

enter image description here

BTW I think I'm using a different version to you as colormap changed to cmap for me (0.3.0).

  • Thanks for the clear answer with example. Found out now that I was using an old version, 0.1.1. After updating everything works as should, a simple plot() already shows 1 color. Nov 22, 2017 at 19:55
  • No worries. I was having the opposite problem, after upgrading I no longer had colour differentiation so had to add in cmap, edgecolour and alpha to get it working like before. Nov 22, 2017 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.