Changeset 20766
- Timestamp:
- 06/16/16 23:38:14 (9 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/Makefile.am
r20726 r20766 152 152 ${ISSM_DIR}/src/m/plot/plot_unit.js \ 153 153 ${ISSM_DIR}/src/m/plot/plot_quiver.js \ 154 ${ISSM_DIR}/src/m/plot/plotdoc.js \ 154 155 ${ISSM_DIR}/src/m/plot/plotmodel.js \ 155 156 ${ISSM_DIR}/src/m/plot/processdata.js \ -
issm/trunk-jpl/src/m/io/download.js
r20727 r20766 1 //DOWNLOAD - save model/variable data to file 2 // 3 // Usage: 4 // download=download('id','slr-download'); 5 // download=download('id','slr-download','data',md.geometry.thickness,'data',md.results.Stressbalance.Vel); 1 function download() { 2 //DOWNLOAD - save model/variable data to file 3 // 4 // Usage: 5 // download=download('id','slr-download'); 6 // download=download('id','slr-download','data',md.geometry.thickness,'data',md.results.Stressbalance.Vel); 6 7 7 function download() {8 8 //Convert arguments to options 9 9 var args = Array.prototype.slice.call(arguments); -
issm/trunk-jpl/src/m/plot/plotdoc.js
r20749 r20766 4 4 // Usage: 5 5 // plotdoc() 6 7 //TODO: Standardize image to overlay_image, heightscale to scaling, colorbarfontsize/color, clarify innermask/outermask, edgecolor implementation, check colormap, 6 8 7 //TODO: Update to ensure only options implemented in js are incldued. 8 console.log(' WARNING: documentation does not reflect implementation as of June 6 2016'); 9 console.log(' WARNING: documentation may not reflect entire implementation as of June 16 2016'); 9 10 console.log(' Plot usage: plotmodel(model,varargin)'); 10 11 console.log(' Options: '); 11 console.log(' ''figure'': figure number'); 12 console.log(' ''data'' : what we want to plot'); 13 console.log(' Available values for ''data'' are: '); 14 console.log(' - any field of the model structure. ex: plot(md,''data'',''vel''), or plot(md,''data'',md.initialization.vel)'); 15 console.log(' - ''basal_drag'': plot the basal drag on the bed (in kPa) based on the velocity in md.initialization'); 16 console.log(' - ''basal_dragx'' or ''basal_dragy'' : plot a component of the basal drag on the bed (in kPa)'); 17 console.log(' - ''boundaries'': this will draw all the segment boundaries to the model, including rifts.'); 18 console.log(' - ''icefront'': this will show segments that are used to define the icefront of the model (Neumann boundary conditions).'); 19 console.log(' - ''BC'': this will draw all the boundary conditions (Dirichlet and Neumann).'); 20 console.log(' - ''deviatoricstress_tensor'': plot the components of the deviatoric stress tensor (tauxx,tauyy,tauzz,tauxy,tauxz,tauyz) if computed'); 21 console.log(' - ''deviatoricstress_principal'': plot the deviatoricstress tensor principal axis and principal values'); 22 console.log(' - ''deviatoricstress_principalaxis1'': arrow plot the first principal axis of the deviatoricstress tensor(replace 1 by 2 or 3 if needed)'); 23 console.log(' - ''driving_stress'': plot the driving stress (in kPa)'); 24 console.log(' - ''elements_type'': model used for each element'); 25 console.log(' - ''elementnumbering'': numbering of elements'); 26 console.log(' - ''vertexnumbering'': numbering of vertices'); 27 console.log(' - ''highlightelements'': to highlight elements to highlight the element list'); 28 console.log(' - ''highlightvertices'': to highlight vertices (use highlight option to enter the vertex list'); 29 console.log(' - ''mesh'': draw mesh using trisurf'); 30 console.log(' - ''referential'': stressbalance referential'); 31 console.log(' - ''riftvel'': velocities along rifts'); 32 console.log(' - ''riftrelvel'': relative velocities along rifts'); 33 console.log(' - ''riftpenetration'': penetration levels for a fault'); 34 console.log(' - ''riftfraction'': fill fractions for every node of the rifts'); 35 console.log(' - ''rifts'': plot mesh with an offset so that rifts are visible'); 36 console.log(' - ''strainrate_tensor'': plot the components of the strainrate tensor (exx,eyy,ezz,exy,exz,eyz) if computed'); 37 console.log(' - ''strainrate_principal'': plot the strainrate tensor principal axis and principal values)'); 38 console.log(' - ''strainrate_principalaxis1'': arrow plot the first principal axis of the strainrate tensor(replace 1 by 2 or 3 if needed)'); 39 console.log(' - ''stress_tensor'': plot the components of stress tensor (sxx,syy,szz,sxy,sxz,syz) if computed'); 40 console.log(' - ''stress_principal'': plot the stress tensor principal axis and principal values'); 41 console.log(' - ''stress_principalaxis1'': arrow plot the first principal axis of the stress tensor(replace 1 by 2 or 3 if needed)'); 42 console.log(' - ''transient_results'': this will console.loglay all the time steps of a transient run (use steps to specify the steps requested)'); 43 console.log(' - ''transient_vel'': this will console.loglay the velocity for the time steps requested in ''steps'' of a transient run'); 44 console.log(' - ''transient_vel'': vel can be by any field of the transient results (vx, vy, vz, vel, temperature, melting, pressure, bed, thickness, surface)'); 45 console.log(' - ''transient_field'': dynamic plot of results. specify ''steps'' option, as fell as ''field'' (defaults are all steps, for ''Vel'' field)'); 46 console.log(' - ''transient_movie'': this will console.loglay the time steps of a given field of a transient run'); 47 console.log(' - ''transient_movie_field'': field to be console.loglayed when doing transient_movie data console.loglay'); 48 console.log(' - ''transient_movie_output'': filename if output is desired for movie'); 49 console.log(' - ''transient_movie_time'': time for each image (default 2 seconds)'); 50 console.log(' - ''thermaltransient_results'': this will console.loglay all the time steps of a thermal transient run'); 51 console.log(' - ''qmuhistnorm'': histogram normal distribution. needs option qmudata'); 52 console.log(' - ''qmumean'': plot of mean distribution in sampling analysis with scaled response. needs option qmudata for descriptor'); 53 console.log(' - ''qmustddev'': plot of stddev distribution in sampling analysis with scaled response. needs option qmudata for descriptor'); 54 console.log(' - ''part_hist'': partitioning node and area histogram'); 55 console.log(' - ''quiver'': quiver plot'); 56 57 console.log(' ''axis'': same as standard matlab option (''equal'',''off'',''equal on'',...)'); 58 console.log(' ''basin'': zoom on a given basin (''pineislandglacier'',''ronneiceshelf'', use isbasin to identify a basin'); 59 console.log(' ''basindeltax'': in m'); 60 console.log(' ''showbasins'': write lables for every existing basin name around the center of the plot'); 61 console.log(' ''caxis'': modify colorbar range. (array of type [a b] where b>=a)'); 62 console.log(' ''backgroundcolor'': plot background color. (default is ''w'')'); 63 console.log(' ''figurebackgroundcolor'': figure background color. (default is ''none'')'); 64 console.log(' ''coord'': ''xy'' (default) or ''latlon'''); 65 console.log(' ''colorlevels'': N or {value1,valu2,value3,...} used if quiver, use different colors for the given number of colors or limits'); 66 console.log(' ''colorbar'': add colorbar (string ''on'' or ''off'')'); 67 console.log(' ''colorbartitle'': colorbar title (string)'); 68 console.log(' ''colorbarYlabel'': colorbar Y label (string)'); 69 console.log(' ''colorbarpos'': [x,y,dx,dy] where x,y,dx and dy are within [0 1]'); 70 console.log(' ''colorbarcornerposition'': ''West'',''North'',etc ...'); 71 console.log(' ''colorbartitlerotation'': -90, etc ...'); 72 console.log(' ''colorbarfontsize'': specify colorbar fontsize'); 73 console.log(' ''colorbarwidth'': multiplier (default 1) to the default width colorbar'); 74 console.log(' ''colorbarheight'': multiplier (default 1) to the default height colorbar'); 75 console.log(' ''colormap'': same as standard matlab option (''jet'',''hsv'',''cool'',''spring'',''gray'',''Ala'',''Rignot'',...)'); 76 console.log(' ''contourlevels'': N or {value1,valu2,value3,...} add the contours of the specified values or N contours'); 77 console.log(' ''contourticks'': ''on'' or ''off'' to console.loglay the ticks of the contours'); 78 console.log(' ''contouronly'': ''on'' or ''off'' to console.loglay the contours on a white background'); 79 console.log(' ''contourcolor'': ticks and contour color'); 80 console.log(' ''density'': density of quivers (one arrow every N nodes, N integer)'); 81 console.log(' ''inset'': add an inset (zoom) of the current figure if 1 (use ''insetx'', ''insety'' and ''insetpos'' to determine the inset position and content)'); 82 console.log(' ''insetx'': [min(x) max(x)] where min(x) and max(x) are values determining the inset content'); 83 console.log(' ''insety'': [min(y) max(y)] where min(y) and max(y) are values determining the inset content'); 84 console.log(' ''insetpos'': [x,y,dx,dy] where x,y,dx and dy are within [0 1]'); 85 console.log(' ''streamlines'': N (number of stream lines) or {[x1 y1],...} (coordinates of seed points) add streanlines on current figure'); 86 console.log(' ''edgecolor'': same as standard matlab option EdgeColor (color name: ''black'' or RGB array: [0.5 0.2 0.8])'); 87 console.log(' ''fontsize'': same as standard matlab option (10,14,...)'); 88 console.log(' ''fontweight'': same as standard matlab option (normal: ''n'',bold: ''b'',light: ''l'',demi: ''d'')'); 89 console.log(' ''fontcolor'': same as standard matlab option'); 90 console.log(' ''highlight'': highlights certain nodes or elements when using ''nodenumbering'' or ''elementnumbering'' or ''highlightnodes '' or ''highlightelements'' option'); 91 console.log(' ''resolution'': resolution used by section value (array of type [horizontal_resolution vertical_resolution])'); 92 console.log(' horizontal_resolution must be in meter, and vertical_resolution a number of layers'); 93 console.log(' ''showsection'': show section used by ''sectionvalue'' (string ''on'' or a number of labels)'); 94 console.log(' ''sectionvalue'': give the value of data on a profile given by an Argus file (string ''Argusfile_name.exp'')'); 95 console.log(' ''profile'': give the value of data along a vertical profile ([xlocation ylocation])'); 96 console.log(' ''smooth'': smooth element data (string ''yes'' or integer)'); 97 console.log(' ''title'': same as standard matlab option'); 98 console.log(' ''view'': same as standard matlab option (ex: 2, 3 or [90 180]'); 99 console.log(' ''xlim'': same as standard matlab option (ex: [0 500])'); 100 console.log(' ''ylim'': same as standard matlab option'); 101 console.log(' ''zlim'': same as standard matlab option'); 102 console.log(' ''xlabel'': same as standard matlab option (ex:''km'')'); 103 console.log(' ''ylabel'': same as standard matlab option'); 104 console.log(' ''xticklabel'': specifiy xticklabel'); 105 console.log(' ''yticklabel'': specifiy yticklabel'); 106 console.log(' ''overlay'': yes or no. This will overlay a radar amplitude image behind'); 107 console.log(' ''overlay_image'': path to overlay image. provide overlay_xlim, overlay_ylim, overlay_xposting and overlay_yposting options also'); 108 console.log(' ''contrast'': (default 1) coefficient to add contrast to the radar amplitude image used in overlays'); 109 console.log(' ''highres'': resolution of overlayed radar amplitude image (default is 0, high resolution is 1).'); 110 console.log(' ''alpha'': transparency coefficient (the higher, the more transparent). Default is 1.5'); 111 console.log(' ''scaling'': scaling factor used by quiver plots. Default is 0.4'); 112 console.log(' ''autoscale'': set to ''off'' to have all the quivers with the same size. Default is ''on'''); 113 console.log(' ''expconsole.log'': plot exp file on top of a data plot. provide exp file as an argument (use a cell of strings if more than one)'); 114 console.log(' ''expstyle'': marker style for expconsole.log plot (use a cell of strings if more than one)'); 115 console.log(' ''linewidth'': line width for expconsole.log plot (use a cell of strings if more than one)'); 116 console.log(' ''border'': size of console.loglay border (in pixels). active only for overlay plots'); 117 console.log(' ''text'': print string, use a cell of strings if more than one'); 118 console.log(' ''textposition'': [x y] position of text, use a cell of strings if more than one'); 119 console.log(' ''textsize'': same as standard ''FontSize'' matlab option applied to text, use a cell of strings if more than one'); 120 console.log(' ''textweight'': same as standard ''FontWeight'' matlab option applied to text, use a cell of strings if more than one'); 121 console.log(' ''textcolor'': same as standard ''color'' matlab option applied to text, use a cell of strings if more than one'); 122 console.log(' ''textrotation'': same as standard ''Rotation'' matlab option applied to text, use a cell of strings if more than one'); 123 console.log(' ''mask'': list of flags of size numberofnodes or numberofelements. Only ''true'' values are plotted '); 124 console.log(' ''nan'': value assigned to NaNs (convenient when plotting BC)'); 125 console.log(' ''partitionedges'': ''off'' by default. overlay plot of partition edges'); 126 console.log(' ''log'': value of log'); 127 console.log(' ''latlon'': ''on'' or {latstep lonstep [resolution [color]]} where latstep,longstep and resolution are in degrees, color is a [r g b] array'); 128 console.log(' ''latlonnumbering'': ''on'' or {latgap longap colornumber latangle lonangle} where latgap and longap are pixel gaps for the numbers,'); 129 console.log(' ''latlonclick'': ''on'' to click on latlon ticks positions'); 130 console.log(' colornumber is a [r g b] array and latangle and lonangle are angles to flip the numbers'); 131 console.log(' ''northarrow'': add an arrow pointing north, ''on'' for default value or [x0 y0 length [ratio width fontsize]] where (x0,y0) are the coordinates of the base, ratio=headlength/length'); 132 console.log(' ''offset'': mesh offset used by ''rifts'', default is 500'); 133 console.log(' ''scaleruler'': add a scale ruler, ''on'' for default value or [x0 y0 length width numberofticks] where (x0,y0) are the coordinates of the lower left corner'); 134 console.log(' ''showregion'': show domain in Antarctica on an inset, use ''insetpos'' properties'); 135 console.log(' ''visible'': ''off'' to make figure unvisible, default is ''on'''); 136 console.log(' ''wrapping'': repeat ''n'' times the colormap (''n'' must be an integer)'); 137 console.log(' ''unit'': by default, in m, otherwise, ''km'' is available'); 138 console.log(' ''legend_position'': by default, ''NorthEasth'''); 139 console.log(' ''qmudata'': data for qmu plots.'); 140 console.log(' {dresp1 ,dresp2 ,hmin,hmax,hnint} or {samp,desc,mu,sigma,hmin,hmax,hnint}'); 141 console.log(' where dresp1 is a structure array of responses (where we need samp and desc), '); 142 console.log(' dresp2 is a structure array of responses (where we only need mu and sigma)'); 143 console.log(' hmin,hmax and hnint are the minimum, maximum and number of intervals of the histogram (optional)'); 144 console.log(' ''figposition'': position of figure: ''fullscreen'', ''halfright'', ''halfleft'', ''portrait'', ''landscape'',... (hardcoded in applyoptions.m)'); 145 console.log(' ''offsetaxispos'': offset of current axis position to get more space (ex: [-0.02 0 0.04 0])'); 146 console.log(' ''axispos'': axis position to get more space'); 147 console.log(' ''hmin'': (numeric, minimum for histogram)'); 148 console.log(' ''hmax'': (numeric, maximum for histogram)'); 149 console.log(' ''hnint'': (numeric, number of intervals for histogram)'); 150 console.log(' ''ymin1'': (numeric, minimum of histogram y-axis)'); 151 console.log(' ''ymax1'': (numeric, maximum of histogram y-axis)'); 152 console.log(' ''ymin2'': (numeric, minimum of cdf y-axis)'); 153 console.log(' ''ymax2'': (numeric, maximum of cdf y-axis)'); 154 console.log(' ''cdfplt'': (char, ''off'' to turn off cdf line plots)'); 155 console.log(' ''cdfleg'': (char, ''off'' to turn off cdf legends)'); 156 console.log(' ''segmentnumbering'': (''off'' by default)'); 157 console.log(' ''kmlgroundoverlay'': (''off'' by default)'); 158 console.log(' ''kmlfilename'': (''tempfile.kml'' by default)'); 159 console.log(' ''kmlroot'': (''./'' by default)'); 160 console.log(' ''kmlimagename'': (''tempimage'' by default)'); 161 console.log(' ''kmlimagetype'': (''png'' by default)'); 162 console.log(' ''kmlresolution'': (1 by default)'); 163 console.log(' ''kmlfolder'': (''Ground Overlay'' by default)'); 164 console.log(' ''kmlfolderdescription'': ('''' by default)'); 165 console.log(' ''kmlgroundoverlayname'': ('''' by default)'); 166 console.log(' ''kmlgroundoverlaydescription'': ('''' by default)'); 167 168 console.log(' any options (except ''data'') can be followed by ''#i'' where ''i'' is the subplot number, or ''#all'' if applied to all plots'); 12 console.log(' "canvasid": canvas id'); 13 console.log(' "data" : what we want to plot'); 14 console.log(' Available values for "data" are: '); 15 console.log(' - any field of the model structure. ex: plot(md,"data","vel"), or plot(md,"data",md.initialization.vel)'); 16 console.log(' - "mesh": draw mesh using trisurf'); 17 console.log(' - "quiver": quiver plot'); 18 console.log(' "caxis": modify colorbar range. (array of type [a b] where b>=a)'); 19 console.log(' "backgroundcolor": plot background color. (default is "w")'); 20 console.log(' "colorbar": add colorbar (string "on" or "off")'); 21 console.log(' "colorbartitle": colorbar title (string)'); 22 console.log(' "colorbarwidth": multiplier (default 1) to the default width colorbar'); 23 console.log(' "colorbarheight": multiplier (default 1) to the default height colorbar'); 24 console.log(' "colormap": same as standard matlab option ("jet","hsv","cool","spring","gray","Ala","Rignot",...)'); 25 console.log(' "edgecolor": same as standard matlab option EdgeColor (color name: "black" or RGB array: [0.5 0.2 0.8])'); 26 console.log(' "view": same as standard matlab option (ex: 2, 3 or [90 180]'); 27 console.log(' "xlim": same as standard matlab option (ex: [0 500])'); 28 console.log(' "ylim": same as standard matlab option'); 29 console.log(' "zlim": same as standard matlab option'); 30 console.log(' "xlabel": same as standard matlab option (ex:"km")'); 31 console.log(' "overlay": yes or no. This will overlay a radar amplitude image behind'); 32 console.log(' "overlay_image": path to overlay image. provide overlay_xlim, overlay_ylim, overlay_xposting and overlay_yposting options also'); 33 console.log(' "alpha": transparency coefficient (the higher, the more transparent). Default is 1.5'); 34 console.log(' "scaling": scaling factor used by quiver plots. Default is 0.4'); 35 console.log(' "linewidth": line width for expconsole.log plot (use a cell of strings if more than one)'); 36 console.log(' "mask": list of flags of size numberofnodes or numberofelements. Only "true" values are plotted '); 37 console.log(' "log": value of log'); 169 38 console.log(' '); 170 39 console.log(' Examples:'); 171 console.log(' plotmodel(md, ''data'',''vel'',''data'',''mesh'',''view#2'',3,''colorbar#all'',''on'',''axis#1'',''off equal'')');172 console.log(' plotmodel(md, ''data'',''highlightelements'',''highlight'',[1 4 10],''expconsole.log'',{''domain1.exp'' ''domain2.exp'' ''domain3.exp''})');40 console.log(' plotmodel(md,"data","vel","data","mesh","view#2",3,"colorbar#all","on")'); 41 console.log(' plotmodel(md,"data",md.geomtery.surface)'); 173 42 }
Note:
See TracChangeset
for help on using the changeset viewer.