File:Parallel Mesh Generation Around the world.png

From crtc.cs.odu.edu
Revision as of 18:33, 6 September 2018 by Ctsolakis (talk | contribs) (Additional Assets)
Jump to: navigation, search
Original file(2,372 × 1,226 pixels, file size: 542 KB, MIME type: image/png)

Additional Assets

Script to generate it :

import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib.pyplot as plt
fig=plt.figure(figsize=[15,10])

ax = plt.axes(projection=ccrs.Robinson())
ax.add_feature(cfeature.LAND,facecolor='lightgrey')
#ax.add_feature(cfeature.OCEAN)
ax.add_feature(cfeature.COASTLINE)
ax.add_feature(cfeature.BORDERS)

# make the map global rather than have it zoom in to
# the extents of any plotted data
#ax.set_global()

#ax.set_extent([-160,160,-90,90])


#https://stackoverflow.com/a/25421922
transform = ccrs.PlateCarree()._as_mpl_transform(ax)
for key, value in places.items():
    print(key)
    lon,lat,x,y = value
    # add marker
    plt.plot(lon,lat, marker='D',color='red',markersize=3,transform=ccrs.Geodetic())
    # add text
    plt.annotate(key,xy=(lon,lat), xytext=(x,y),arrowprops=dict(arrowstyle="->",color='red'),xycoords=transform)

# Save the plot by calling plt.savefig() BEFORE plt.show()
#plt.savefig('map.svg')
plt.savefig('map.png',dpi=200,bbox_inches='tight')

plt.show()

Sample data:

places = dict()

  1. Paris,Saclay INRIA

lat = 48.73668 lon = 2.180034 x = lon -25 y = lat -5 places['INRIA'] = [lon,lat,x,y]

  1. Swansea

lat = 51.6214 lon = -3.9436 x = lon - 30 y = lat - 1 places['Swansea'] = [lon,lat,x,y]

  1. London Imperial

lat = 51.5074 lon = -0.1278 x = lon -40 y = lat + 2 places['Imperial'] = [ lon,lat,x,y]

  1. Belgium, Université catholique de Louvain

lat = 50.85045 lon = 4.34878 x = lon -45 y = lat -3 places['UCLouvain'] = [lon,lat,x,y]

  1. Fairfax

lat = 38.8321946 lon = -77.308036 x = lon +7 y = lat -3 places['GMU'] = [lon,lat,x,y]

  1. Troy

lat = 42.7302 lon = -73.6788 x = lon +15 y = lat +1 places['RPI'] = [lon,lat,x,y]

  1. NASA LaRC

lon = -76.385486 lat = 37.096157 x = lon +15 y = lat -8 places['LaRC'] = [lon,lat,x,y]

  1. ODU

lat= 36.8466667 lon = -76.2855556 x = lon +15 y = lat -15 places['ODU'] = [lon,lat,x,y]

  1. St. Louis

lat = 38.627003 lon = -90.199402 x = lon -15 y = lat +5 places['Boeing'] = [lon,lat,x,y]

  1. UTexas , Austin

lat = 30.2672 lon = -97.7431 x = lon - 8 y = lat - 15 places['UTexas'] = [lon,lat,x,y]

  1. Alburquerque

lat = 35.106766 lon =-106.629181 x = lon -15 y = lat +5 places['Sandia'] = [lon,lat,x,y]

  1. British Columbia , vancouver

lat = 49.2827 lon = -123.1207 x= lon +10 y = lat +2 places['British Columbia'] = [ lon,lat,x,y]

  1. Santiago Chile

lon = -70.6666667 lat = -33.45 x = lon -20 y = lat places['UChile'] = [lon,lat,x,y]

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current21:41, 10 September 2018Thumbnail for version as of 21:41, 10 September 20182,372 × 1,226 (542 KB)Ctsolakis (talk | contribs)
18:21, 6 September 2018Thumbnail for version as of 18:21, 6 September 20181,794 × 1,557 (319 KB)Ctsolakis (talk | contribs)
18:06, 6 September 2018Thumbnail for version as of 18:06, 6 September 20181,794 × 1,581 (323 KB)Ctsolakis (talk | contribs)
  • You cannot overwrite this file.

There are no pages that link to this file.