Skip to content

Commit 44e6950

Browse files
author
Jeff Whitaker
committed
check for existence of plt.streamplot, fix docstring.
1 parent b7e08c9 commit 44e6950

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/streamplot_demo.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# example showing how to use Line Integral Convolution to visualize a vector
2-
# flow field (from Hurricane Earl). Produces something akin to streamlines.
3-
# Requires vectorplot scikit (http://scikits.appspot.com/vectorplot).
1+
# example showing how to use streamlines to visualize a vector
2+
# flow field (from Hurricane Earl).
3+
# Requires matplotlib 1.1.1 or newer.
44
from netCDF4 import Dataset as NetCDFFile
55
from mpl_toolkits.basemap import Basemap, interp
66
import numpy as np
77
import matplotlib.pyplot as plt
88

9+
if not hasattr(plt, 'streamplot'):
10+
raise ValueError('need newer version of matplotlib to run this example')
11+
912
# H*wind data from http://www.aoml.noaa.gov/hrd/data_sub/wind.html
1013
ncfile = NetCDFFile('rita.nc')
1114
udat = ncfile.variables['sfc_u'][0,:,:]

0 commit comments

Comments
 (0)