0

With

ax = gdf.plot(cmap="jet", column=ColumnaAVisualizar, categorical=True,figsize=(12,12),legend=True)
ax2=ZDE.boundary.plot(ls="--",color="k", label="Zona de Estudio", ax=ax)
plt.show()

It gives: enter image description here

Now with

ax = gdf.plot(cmap="jet", column=ColumnaAVisualizar, categorical=True,figsize=(12,12),legend=True)
l1=ax.legend(loc='center right', bbox_to_anchor=(1.0, 0.5))
ax2=ZDE.boundary.plot(ls="--",color="k", label="Zona de Estudio", ax=ax)
l2=ax2.legend(loc='center left', bbox_to_anchor=(1.0, 0.5))
ax.add_artist(l1)
plt.show()

It gives:

enter image description here

So I would like something with the two legends:

enter image description here

PS: Both gdf have the same CRS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.