def test_attribution(): fig, ax = matplotlib.pyplot.subplots(1) txt = ctx.add_attribution(ax, "Test") assert isinstance(txt, matplotlib.text.Text) assert txt.get_text() == "Test" # test passthrough font size and kwargs fig, ax = matplotlib.pyplot.subplots(1) txt = ctx.add_attribution(ax, "Test", font_size=15, fontfamily="monospace") assert txt.get_size() == 15 assert txt.get_fontfamily() == ["monospace"]
def test_attribution(): f, ax = matplotlib.pyplot.subplots(1) ax = ctx.add_attribution(ax, 'Test')
#check our CRS - coordinate reference system gages.crs #Check the spatial extent gages.total_bounds #NOTE to selves - find out how to get these all at once # %% file = os.path.join('..\data', '10ffa493-aa79-412a-88e1-d787c8e3ae94202042-1-1s47isu.kjf5.shp') azstate = gpd.read_file(file) # %% fig, ax =plt.subplots(figsize=(5,5)) #gages.plot(ax=ax) azstate.plot(ax=ax) ctx.add_basemap(ax) ctx.add_attribution(ax,'Testing this map') plt.show() # %% # Now lets make a map! fig, ax =plt.subplots(figsize=(5,5)) gages.plot(ax=ax) azstate.plot(ax=ax) #ctx.add_basemap(ax) #ctx.add_attribution(ax,'Testing this map') plt.show() # %% # Zoom in and just look at AZ gages.columns