kill a window

J Conrado jorge.conforte at inpe.br
Tue Apr 7 12:37:13 EDT 2020



Hi,

I have a script that read a netcdf data. I enter with keiboard two 
values for latitude initial an final and same for longitude and I plot a 
map. I use the command plt.close(1) to kill the window. But, my window 
is not closed. This is a small par o my script:


m = Basemap(llcrnrlon=loni, llcrnrlat=lati,
                 urcrnrlon=lonf, urcrnrlat=latf,
                 resolution='i', projection='merc',
                 lon_0=dellon, lat_0=dellat)

# can get the identical map this way (by specifying width and
# height instead of lat/lon corners)
# m = Basemap(width=894887,height=1116766,\
# resolution='i',projection='tmerc',lon_0=-4.36,lat_0=54.7)
m.drawcoastlines()
m.fillcontinents(color='coral', lake_color='aqua')
m.drawparallels(np.arange(lati, latf, 5.))
m.drawmeridians(np.arange(loni, lonf, 5.))
m.drawmapboundary(fill_color='aqua')
plt.title("Região a Ser Setorizada")


plt.show()

plt,close(1)

and to kil the window I have to click on the "X" in the top my window.

What can I do to kil the window and plot other windows in squence.


Thanks,


Conrado



More information about the Python-list mailing list