Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ctroupin committed Jul 28, 2016
1 parent a9494ad commit 49b07c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
19 changes: 10 additions & 9 deletions diva_plot_contour.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env python
'''
diva_plot_contour.py
# diva_plot_contour.py
#
# Plot the selected contour
#
# http://modb.oce.ulg.ac.be/mediawiki/index.php/Diva_python
# ------------------------------------------------------------------------------
Provide an example of how to plot a given contour selected contour
on a map using the Basemap module
http://modb.oce.ulg.ac.be/mediawiki/index.php/Diva_python
'''

import os
import numpy as np
Expand All @@ -17,7 +18,7 @@
# User options
# -------------

# Resolution for coastline
# Resolution for coastline
basemap_resolution = 'l'

# File and directory names
Expand All @@ -30,7 +31,7 @@
figtype = '.eps'
figname = figdir + figbasename + figtype

# Region of interest
# Region of interest
lonmin = -7.
lonmax = 38.
latmin = 30.
Expand Down Expand Up @@ -62,7 +63,7 @@

m = Basemap(projection='merc', llcrnrlon=lonmin, llcrnrlat=latmin,
urcrnrlon=lonmax, urcrnrlat=latmax,
lat_ts=0.5 * (lonmin + lonmax),
lat_ts=0.5 * (latmin + latmax),
resolution=basemap_resolution)
m.ax = ax

Expand Down
10 changes: 5 additions & 5 deletions diva_plot_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from matplotlib.path import Path
import matplotlib.patches as patches

# Clean
# Clean
os.system('clear')

# -------------
# User options
# -------------

# Resolution for coastline
# Resolution for coastline
basemap_resolution = 'i'

# File and directory names
Expand All @@ -36,7 +36,7 @@
figtype = '.eps'
figname = figdir + figbasename + figtype

# Region of interest
# Region of interest
lonmin = -7.
lonmax = 38.
latmin = 30.
Expand Down Expand Up @@ -87,7 +87,7 @@

m = Basemap(projection='merc', llcrnrlon=lonmin, llcrnrlat=latmin,
urcrnrlon=lonmax, urcrnrlat=latmax,
lat_ts=0.5 * (lonmin + lonmax),
lat_ts=0.5 * (latmin + latmax),
resolution=basemap_resolution)
m.ax = ax

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

# Set axis limits
# Set axis limits
m.ax.set_xlim(lonmin, lonmax)
m.ax.set_ylim(latmin, latmax)

Expand Down

0 comments on commit 49b07c2

Please sign in to comment.