I have a GeoDataFrame that I'm plotting in Matplotlib as a choropleth map. gdf.plot(ax = ax, column = 'column to color by', legend = True, legend_kwds={"label": "Label", "orientation": "horizontal", 'pad':0}, cmap = 'viridis') This automatically generates a colorbar legend that looks like this: This is fine, but the data in the "column to color by" are all integers between 1 and 3 (and the column in the GeoDataFrame is an integer dtype). Is there any easy way to modify the legend keywords so that the colorbar ticks only label the integers? I know there are ways to create discrete colorbars, but I was hoping for a solution to quickly modify the existing code I have. Continue reading...