Changeset 21256
- Timestamp:
- 10/11/16 07:24:53 (8 years ago)
- Location:
- issm/trunk-jpl/src/m/plot
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/plot_unit.py
r21253 r21256 1 1 from cmaptools import truncate_colormap 2 from plot_quiver import plot_quiver 2 3 try: 3 4 import pylab as p … … 89 90 # {{{ plotting quiver (TODO) 90 91 elif datatype==3: 91 vx=data[:,0] 92 vy=data[:,1] 93 #TODO write plot_quiver.py to handle this here 94 color=np.sqrt(vx**2+vy**2) 95 scale=options.getfieldvalue('scale',1000) 96 width=options.getfieldvalue('width',0.005*(np.amax(x)-np.amin(y))) 97 headwidth=options.getfieldvalue('headwidth',3) 98 headlength=options.getfieldvalue('headlength',5) 99 Q=ax.quiver(x,y,vx,vy,color,cmap=cmap,norm=norm,scale=scale, 100 width=width,headwidth=headwidth,headlength=headlength) 92 if is2d: 93 Q=plot_quiver(x,y,data,options,ax) 94 else: 95 raise ValueError('plot_unit error: 3D node plot not supported yet') 101 96 return 97 102 98 # }}} 103 99 # {{{ plotting P1 Patch (TODO)
Note:
See TracChangeset
for help on using the changeset viewer.