Changeset 19039
- Timestamp:
- 01/26/15 18:06:05 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/export_gl.py
r19038 r19039 1 1 def export_gl(md,varargin): 2 2 return; 3 3 templist=plotoptions(varargin[:]); 4 4 optionslist=templist.list; … … 24 24 25 25 #Deal with contour {{{ 26 27 contour_lat1=md.mesh.lat(md.mesh.segments(:,1)); 28 contour_lat2=md.mesh.lat(md.mesh.segments(:,2)); 29 contour_long1=md.mesh.long(md.mesh.segments(:,1)); 30 contour_long2=md.mesh.long(md.mesh.segments(:,2)); 31 contour_surface1=md.geometry.surface(md.mesh.segments(:,1)); 32 contour_surface2=md.geometry.surface(md.mesh.segments(:,2)); 26 contour_lat1=md.mesh.lat(md.mesh.segments[:,1]); 27 contour_lat2=md.mesh.lat(md.mesh.segments[:,2]); 28 contour_long1=md.mesh.long(md.mesh.segments[:,1]); 29 contour_long2=md.mesh.long(md.mesh.segments[:,2]); 30 contour_surface1=md.geometry.surface(md.mesh.segments[:,1]); 31 contour_surface2=md.geometry.surface(md.mesh.segments[:,2]); 33 32 34 33 R1=6371000*ones(len(contour_surface1),1)+scaling_factor*contour_surface1; 35 34 R2=6371000*ones(len(contour_surface2),1)+scaling_factor*contour_surface2; 36 35 37 contourx1 = R1 * cosd(contour_lat1) * cosd(contour_long1 ;36 contourx1 = R1 * cosd(contour_lat1) * cosd(contour_long1); 38 37 contoury1 = R1 * cosd(contour_lat1) * sind(contour_long1); 39 38 contourz1 = R1 * sind(contour_lat1); … … 83 82 data=getfieldvalue(options,'data'); 84 83 results[i].data=data; 85 results[i].caxis=getfieldvalue(options,'caxis',[min(data) max(data)]);84 results[i].caxis=getfieldvalue(options,'caxis',[min(data), max(data)]); 86 85 87 86 label=getfieldvalue(options,'label',''); 88 87 if strcmpi(label,''): 89 88 #create generic label: 90 label=['data' num2str(i)];89 label=['data', num2str(i)]; 91 90 results[i].label=label; 92 91 … … 94 93 if strcmpi(shortlabel,''): 95 94 #create generic short label: 96 shortlabel=['data' num2str(i)];95 shortlabel=['data', num2str(i)]; 97 96 results[i].shortlabel=shortlabel; 98 97 99 98 if len(data[2])>1: 100 time_range=getfieldvalue(options,'time_range',[0 100]);99 time_range=getfieldvalue(options,'time_range',[0, 100]); 101 100 results[i].time_range=time_range; 102 101 … … 109 108 110 109 #Write model to javascript database file: 111 writejsfile( [directory databasename '.js'],model,databasename);110 writejsfile(directory + databasename + '.js',model,databasename); 112 111 #}}}
Note:
See TracChangeset
for help on using the changeset viewer.