Python Forum
python basemap, cant show the right coordinates
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python basemap, cant show the right coordinates
#1
I'm trying to show points on a map. For some reason, i get a map with a single point at the bottom left of the figure. I checked the coordinates and they are fine. I also tried to set other specific coordinate (which i know they must be in the area) and got the same thing. Anyone have an idea what could be the problem? Any help will be appreciated!
def event_trajectory(nclib,plib):
    latslst,lonslst=([],[])

    for i in plib:
        lats,lons = latlon_coords(i[unravel_index(i.argmax(), i.shape)])
        latslst.append(lats)
        lonslst.append(lons)

    bm = get_basemap(plib[5])
    fig = plt.figure(figsize=(12,9))
    bm.drawcoastlines(linewidth=0.25)
    bm.drawstates(linewidth=0.25)
    bm.drawcountries(linewidth=0.25)

    plt.scatter(to_np(latslst),to_np(lonslst),marker = 'o', color='b',zorder=5)

    plt.show()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  mpl_toolkits.basemap rf_kartal 0 363 Jul-18-2023, 08:26 AM
Last Post: rf_kartal
  PIL Image im.show() no show! Pedroski55 2 978 Sep-12-2022, 10:19 PM
Last Post: Pedroski55
  PIL Image im.show() no show! Pedroski55 6 4,954 Feb-08-2022, 06:32 AM
Last Post: Pedroski55
  Show real time temperature and storage with Python linkxxx 4 2,779 Aug-28-2019, 02:06 PM
Last Post: linkxxx
  How to switch table area coordinates in Python Camelot and Tabula-Py john5 0 4,287 May-08-2019, 04:31 PM
Last Post: john5
  readshapefile function in basemap - confusion regarding arguments sendiptangshu 1 2,540 Mar-09-2019, 09:29 AM
Last Post: Larz60+
  Python show the combinations of list of elements zydjohn 6 7,530 Mar-06-2018, 11:23 PM
Last Post: zydjohn
  Project Using Python, No Skill, Idea first = Need experienced to show me the path. nefajcito 3 3,982 Apr-22-2017, 09:11 AM
Last Post: nefajcito

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020