We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7e08c9 commit 44e6950Copy full SHA for 44e6950
examples/streamplot_demo.py
@@ -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).
+# example showing how to use streamlines to visualize a vector
+# flow field (from Hurricane Earl).
+# Requires matplotlib 1.1.1 or newer.
4
from netCDF4 import Dataset as NetCDFFile
5
from mpl_toolkits.basemap import Basemap, interp
6
import numpy as np
7
import matplotlib.pyplot as plt
8
9
+if not hasattr(plt, 'streamplot'):
10
+ raise ValueError('need newer version of matplotlib to run this example')
11
+
12
# H*wind data from http://www.aoml.noaa.gov/hrd/data_sub/wind.html
13
ncfile = NetCDFFile('rita.nc')
14
udat = ncfile.variables['sfc_u'][0,:,:]
0 commit comments