Yes, it is possible to update the background of Geopandas even if some shapes are not outlined. You can set the edgecolor
and linewidth
parameters of the plot()
function to None
and 0
respectively, to remove the outline of specific shapes. Here is an example:
import geopandas as gpd import matplotlib.pyplot as plt # Read in the shapefile world = gpd.read_file('path_to_shapefile') # Plot the map with specific shapes without outline ax = world.plot(column='population', cmap='OrRd', edgecolor='None', linewidth=0) ax.set_axis_off() plt.show()
In this example, the edgecolor
parameter is set to 'None'
and the linewidth
parameter is set to 0
to remove the outline of specific shapes. The ax.set_axis_off()
function is used to remove the axis labels and ticks from the plot.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-10-15 11:00:00 +0000
Seen: 10 times
Last updated: Aug 08 '21
How can popen() be used to direct streaming data to TAR?
In Python, can a string be utilized to retrieve a dataframe that has the same name as the string?
What is the method for merging field value and text into a singular line for display?
What is the method for programmatic access to a time series?