I want two independent plots to be overlayed on one matplotlib
figure.
So I plot a network graph from osmnx
import osmnx as ox
G = ox.graph_from_place('Piedmont, California, USA', network_type='drive')
fig, ax = ox.plot_graph(G)
Then I plot the networkx
graph with:
nx.draw(nx.generators.barabasi_albert_graph(10,3), ax = ax)
And I want one to be overlayed on the other nicely, however the coordinates are completely different. First one is lon, lat and the second is randomly generated from networkx.
How to scale them nicely so that they are visible?
I tried ax.twinx(), but it doesn't work for me.
PS. For networks I can pass ax nx.draw(G, ax = ax)
for osmnx not, it is returned from plot only fig, ax = ox.plot(G)