0

I'm trying to plot locations over a map using arcgisimage. I have used basemap to plot some data but the image becomes pixelated at a close range. Using arcgisimage I have generated an image of the area - but I am not sure how to plot points over it (also the image comes up as another window - not in my jupiter notebook). Is there a way to do this?

    from mpl_toolkits.basemap import Basemap
    import matplotlib.pyplot as plt

    m = Basemap(
        llcrnrlon=4,llcrnrlat=59,urcrnrlon=6,urcrnrlat=60,
         epsg = 5939)
    m.arcgisimage(service='World_Shaded_Relief', xpixels=7000, verbose=True)

    x, y = m(8.4, 60.4)
    #plt.plot(x, y, 'ok', markersize=5)
    plt.text(x, y, 'Norway', fontsize=12, color ='white' );

    well_lat_y = loc1["Latitude "].tolist()
    well_lat_x = loc1["Longitude"].tolist()

    m.scatter(well_lat_x ,well_lat_y , latlon = True, s = 10, c = 'red', marker = 'o', alpha = 
    1, edgecolor= 'k')

    plt.show()

this code just gives me an image

  • hi..i guess you should add the projection style in your basemap probably as projection='cyl' or "merc" or "mill" what ever best on your side. another thing is that pls check you plotting range for putting" Norway" as it falls out of your definition basemap range pls try to change it to x,y=m(5.0, 59.5) and you will see the results.. – Azam Jan 06 '22 at 01:31
  • for scatter plots I dont know what data you intend to plot but it seems ok for me. surely you will get the result following the suggestion above. good luck – Azam Jan 06 '22 at 01:32

0 Answers0