How to show lat/lon grid on scattermapbox plots?

Hello all,

I am plotting data using the scattermapbox tool and I can’t find a way to overlay a latitude/longitude grid on top of the map as in this example:

Folium makes it possible on the same maps used in plotly (open street map for example) with the ‘Polyline’ tool, as in this example:

but I prefer to plot my data with plotly, so I’d rather not use folium.

I saw that it was possible with the go.Scatter_geo tool (Map configuration and styling in Python), but it does not correspond to my use case because I want to use the stamen-terrain background on my map, which I don’t believe is possible with Scatter_geo.

As it is a very general question, I did not include a working example, but I can if needed.

Thanks for your answers.