Skip to content

Commit 49b07c2

Browse files
committed
minor changes
1 parent a9494ad commit 49b07c2

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

diva_plot_contour.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env python
2+
'''
3+
diva_plot_contour.py
24
3-
# diva_plot_contour.py
4-
#
5-
# Plot the selected contour
6-
#
7-
# http://modb.oce.ulg.ac.be/mediawiki/index.php/Diva_python
8-
# ------------------------------------------------------------------------------
5+
Provide an example of how to plot a given contour selected contour
6+
on a map using the Basemap module
7+
8+
http://modb.oce.ulg.ac.be/mediawiki/index.php/Diva_python
9+
'''
910

1011
import os
1112
import numpy as np
@@ -17,7 +18,7 @@
1718
# User options
1819
# -------------
1920

20-
# Resolution for coastline
21+
# Resolution for coastline
2122
basemap_resolution = 'l'
2223

2324
# File and directory names
@@ -30,7 +31,7 @@
3031
figtype = '.eps'
3132
figname = figdir + figbasename + figtype
3233

33-
# Region of interest
34+
# Region of interest
3435
lonmin = -7.
3536
lonmax = 38.
3637
latmin = 30.
@@ -62,7 +63,7 @@
6263

6364
m = Basemap(projection='merc', llcrnrlon=lonmin, llcrnrlat=latmin,
6465
urcrnrlon=lonmax, urcrnrlat=latmax,
65-
lat_ts=0.5 * (lonmin + lonmax),
66+
lat_ts=0.5 * (latmin + latmax),
6667
resolution=basemap_resolution)
6768
m.ax = ax
6869

diva_plot_mesh.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
from matplotlib.path import Path
1616
import matplotlib.patches as patches
1717

18-
# Clean
18+
# Clean
1919
os.system('clear')
2020

2121
# -------------
2222
# User options
2323
# -------------
2424

25-
# Resolution for coastline
25+
# Resolution for coastline
2626
basemap_resolution = 'i'
2727

2828
# File and directory names
@@ -36,7 +36,7 @@
3636
figtype = '.eps'
3737
figname = figdir + figbasename + figtype
3838

39-
# Region of interest
39+
# Region of interest
4040
lonmin = -7.
4141
lonmax = 38.
4242
latmin = 30.
@@ -87,7 +87,7 @@
8787

8888
m = Basemap(projection='merc', llcrnrlon=lonmin, llcrnrlat=latmin,
8989
urcrnrlon=lonmax, urcrnrlat=latmax,
90-
lat_ts=0.5 * (lonmin + lonmax),
90+
lat_ts=0.5 * (latmin + latmax),
9191
resolution=basemap_resolution)
9292
m.ax = ax
9393

@@ -108,7 +108,7 @@
108108
patch = patches.PathPatch(path, facecolor='none', lw=1)
109109
m.ax.add_patch(patch)
110110

111-
# Set axis limits
111+
# Set axis limits
112112
m.ax.set_xlim(lonmin, lonmax)
113113
m.ax.set_ylim(latmin, latmax)
114114

0 commit comments

Comments
 (0)