i have been trying to get these two plots to overlay, tried union operation-not working .Individually they are plotting just fine but i want to show the region of olympic national park over the boundary of the washington state. I have a geojson file for the olympic national park and a geojson for the state of washington. what am i missing? looks like two different graphs are plotted. base = df_washington.plot(color='white', edgecolor='black',figsize=(10,20),zorder=0) df_olympic.plot(ax=base)
#๐ Matplotlib plot overlay
7 messages ยท Page 1 of 1 (latest)
@quartz parrot
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
I don't know anything about geo plotting but the df.plot() method returns axes object(s), so you can assign it to ax and check if there are two axes in one figure, which should answer your question whether it's two plots in one
perhaps - and I'm really not sure - you could split the axes and use subplots to separate them
well i tried ``` fig,ax=plt.subplots()
df_washington.plot(ax=ax,color='white', edgecolor='black',figsize=(10,20),zorder=0)
df_olympic.plot(ax=ax)
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.