The rioxarray and earthpy packages can work. See this interresting tutorial on https://www.earthdatascience.org/courses/scientists-guide-to-plotting-data-in-python/plot-spatial-data/customize-raster-plots/plotting-extents/
Here is an example of code superimposing a GeoTif (elevation background) and three vectorial layers (boundaries, lakes and rivers of Burundi).
import matplotlib.pyplot as plt
import geopandas
import rioxarray as rxr
from rasterio.plot import plotting_extent
import earthpy.plot as ep
fp = "couleur_elevation_burundi.tif"
bdi="BDI_adm0.gpkg"
lakes="osm_lakes.gpkg"
rivers="osm_rivers_fusionne.gpkg"
output_map="_test_color.png"
raster_data = rxr.open_rasterio(fp, masked=True)
raster_data_extent = plotting_extent(raster_data[0], raster_data.rio.transform())
print(raster_data_extent)
f, ax = plt.subplots()
ax.set_xlim(29, 31)
ax.set_ylim(-4.5, -2.3)
ep.plot_rgb(raster_data.values,
rgb=[0, 1, 2],
ax=ax,
title="test Burundi",
extent=raster_data_extent)
lakes_shp=geopandas.read_file(lakes)
lakes_shp.plot(ax=ax)
lakes_shp.set_crs(epsg=4326, inplace=True)
rivers_shp=geopandas.read_file(rivers)
rivers_shp.plot(ax=ax, linewidth=0.2, color="blue")
rivers_shp.set_crs(epsg=4326, inplace=True)
prov_shp=geopandas.read_file(bdi)
prov_shp.boundary.plot(ax=ax,color="black", linewidth=0.3)
prov_shp.set_crs(epsg=4326, inplace=True)
ax.set_xticks([29,29.5,30, 30.5,31])
ax.set_yticks([-4.5, -4, -3.5, -3, -2.5])
plt.savefig(output_map)
