Ignore:
Timestamp:
06/23/17 17:17:47 (8 years ago)
Author:
dlcheng
Message:

CHG: Updating js plot routines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/plotdoc.js

    r21641 r21768  
    55        //      plotdoc()
    66       
    7         //TODO: Standardize image to overlay_image, heightscale to scaling, colorbarfontsize/color, clarify innermask/outermask, edgecolor implementation, check colormap,
     7        //TODO: rename innermask/outermask/maskzero and combine
    88
    9         console.log(' WARNING: starred methods (*) are experimental and not guarenteed to be stable');
    109        console.log('   Plot usage: plotmodel(model,varargin)');
    1110        console.log('   Options: ');
    1211        console.log('       "canvasid": canvas id');
    1312        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('       "2d": renders orthographic camera with view set to [0, 90] (default "off", ex: "on", "off")');
     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('                   - "mesh": draw mesh using trisurf');
     16        console.log('                   - "quiver": quiver plot');
    1917        console.log('       "backgroundcolor": plot background color. (default "lightcyan", ex: "green","blue")');
    2018        console.log('       "brush": specify brush options (default {"strength":0.075,"falloff":0.5})');
     19        console.log('           "enabled": toggle brush (default false, ex: true)');
     20        console.log('           "strength": value that brush will change data points by (ex: 0.075)');
     21        console.log('           "falloff": multiplier that brush will decrease strength by for each successive point away from brush center (ex: 0.5)');
     22        console.log('       "clouds": specify brush options (default {"strength":0.075,"falloff":0.5})');
     23        console.log('           "enabled": toggle clouds (default false, ex: true)');
     24        console.log('           "height": height to spawn clouds at (ex: 7500)');
     25        console.log('           "quantity": quantity of clouds to spawn (ex: 10)');
    2126        console.log('       "caxis": modify  colorbar range. (array of type [a, b] where b>=a)');
    2227        console.log('       "colorbar": add colorbar (default "off", ex: "on", "off")');
     
    3237        console.log('       "colormap": same as standard matlab option (default "jet", ex: "hsv","cool","spring","gray","Ala","Rignot",...)');
    3338        console.log('       "controlsensitivity": sensitivty of view/zoom changes as a percentage of default (default 1, ex: 0.5, 2.75)');
    34         console.log('       "datamarkers": toggle data marker displays (default "on", ex: "on", "off")');
    35         console.log('       "datamarkers_image": toggle data marker displays (default "on", ex: "on", "off")');
    36         console.log('       "datamarkerssize": specifiy the width and height of the data markers (default [32,32], ex: [24,32], [105,10])');
    37         console.log('       "datamarkersoptions": specifiy options for data markers (default {"enabled":"on","image":canvas.rootPath+"textures/data_marker.svg","size":[32,32],"format":["X: %.2e<br>Y: %.2e<br>Z: %.2e]<br>Value: %0.1f","x","y","z","value"]}');
     39        console.log('       "datamarkers": object cotaining data marker parameters. See webgl.js for defaults. (ex: {"enabled":true,"format":["<div id="sim-plot"></div>"],"labels":["thickness","velocity","value"],"animated":true})');
     40        console.log('           "enabled": toggle data marker displays (default true, ex: false)');
     41        console.log('           "image": image used for marking the clicked point (ex: "/textures/data_marker.svg")');
     42        console.log('           "labels": when displaying a sim-plot graph, display these model fields. (ex: ["thickness","velocity","value"])');
     43        console.log('           "font": font to be used for display (ex: "24px "Comic Sans MS", cursive")');
     44        console.log('           "format": an array compatible with sprintf that will be displayed as html (ex: ["X: %.2e<br>Y: %.2e<br>Z: %.2e]<br>Value: %0.1f","x","y","z","value"])');
     45        console.log('                   "size": specifiy the width and height of the data markers (default [32,32], ex: [24,32], [105,10])');
    3846        console.log('       "displayview": print view value to console (default "off", ex: "on", "off")');
    3947        console.log('       "displayzoom": print zoom value to console (default "off", ex: "on", "off")');
    4048        console.log('       "edgecolor": same as standard matlab option EdgeColor (default "black", ex: color name: "blue" or RGB array: [0.5, 0.2, 0.8])');
    4149        console.log('       "heightscale": scaling factor to accentuate height. (default 1, ex: 0.5, 100)');
    42         console.log('       "linewidth*": line width for mesh, quiver, and contour plots, currently limited by WebGL to 1. (default 1, ex: 2, 5)');
     50        console.log('       "linewidth": line width for mesh, quiver, and contour plots, currently limited by WebGL to 1. (default 1, ex: 2, 5)');
    4351        console.log('       "log": value of log (default 10, ex: 2, Math.E)');
    4452        console.log('       "mask": list of flags of size numberofnodes or numberofelements. Only "true" values are plotted ');
    45         console.log('       "movieoptions": specify movie options (default {"fps":4,"loop":true})');
     53        console.log('       "movies": object cotaining transient plot animation options (ex: {"fps":4,"loop":true})');
     54        console.log('       "maskzeros": object cotaining transient plot animation options (ex: "enabled":true,"color":[1.0, 1.0, 1.0, 1.0],"tolerance":1e-3,"zeroValue":0.5})');
     55        console.log('           "enabled": toggle maskzeros (default false, ex: true)');
     56        console.log('           "color": RGBA color value array with ranges 0.0 to 1.0 (ex: [1.0, 1.0, 1.0, 1.0])');
     57        console.log('           "tolerance": values within this tolerance of the zeroValue will be masked. (default: 1e-3, ex: 2.5e-2)');
     58        console.log('           "zeroValue": the percentage value with range 0.0, to 1.0 of the caxis value around which the data will be masked with the color. (default: 0.5, ex: 0, 1.0, 0.75)');
    4659        console.log('       "innermask*": Special mask that colors all parts of a data mesh below a height a certain color. provide innermaskheight and innermaskcolor options also (default "off", ex: "on", "off")');
    4760        console.log('       "outermask*": Special mask that colors all parts of a overlay mesh below a height a certain color. provide outermaskheight and outermaskcolor options also (default "off", ex: "on", "off")');
     
    5164        console.log('       "scaling": scaling factor used by quiver plots. Default is 0.4');
    5265        console.log('       "alpha": transparency coefficient 0.0 to 1.0, the lower, the more transparent. (default 1.0, ex: 0.5, 0.25)');
    53         console.log('       "azlim": azimuth view limits (ex: [0, 180])');
    54         console.log('       "ellim": elevation view limits (ex: [-90, 90])');
    55         console.log('       "origin": initial camera offset from model center (default [0,0,0.0], ex: [-2, 1.5, 0.01])');
    56         console.log('       "render": toggle sky, ground, and space rendering. (default [], ex: ["sky", "space"], ["ground"])');
    57         console.log('       "viewPanning": enable view origin panning with two-finger touch or shift+mouse drag. (default "off", ex: "on", "off")');
    58         console.log('       "view": initial azimuth and elevation angles for camera (default [0,90], ex: [90, 180]');
     66        console.log('       "render": a object containing a list of default object to render. (default {}, ex: {"sky", "space"})');
     67        console.log('           "sky": render the atmosphere. (ex: {"enabled":true})');
     68        console.log('                   "enabled": toggle sky (default false, ex: true)');
     69        console.log('           "space": render space. (ex: {"enabled":true})');
     70        console.log('                   "enabled": toggle space (default false, ex: true)');
     71        console.log('           "coastlines": render coastlines. (ex: {"enabled":true})');
     72        console.log('                   "enabled": toggle coastlines (default false, ex: true)');
     73        console.log('                   "scale": scale coastlines factor (default 1.0, ex: 1.004)');
     74        console.log('                   "x": x coordinate array. (ex: [0.0, 10.0, -25.0,...])');
     75        console.log('                   "y": y coordinate array. (ex: [0.0, 10.0, -25.0,...])');
     76        console.log('                   "z": z coordinate array. (ex: [0.0, 10.0, -25.0,...])');
     77        console.log('           "city": render city. (ex: {"enabled":true})');
     78        console.log('                   "enabled": toggle city (default false, ex: true)');
     79        console.log('                   "size": radius of city sphere, in meters (default 1.0, ex: 150000)');
     80        console.log('                   "color": color of city sphere (ex: "magenta")');
     81        console.log('                   "x": x coordinate of city. (ex: 0.0)');
     82        console.log('                   "y": y coordinate of city. (ex: 0.0)');
     83        console.log('                   "z": z coordinate of city. (ex: 6356700.0)');
     84        console.log('           "cities": render cities. (ex: {"enabled":true})');
     85        console.log('                   "enabled": toggle cities (default false, ex: true)');
     86        console.log('                   "size": radius of cities spheres, in meters (default 1.0, ex: 80000)');
     87        console.log('                   "color": color of cities spheres (ex: "darkviolet")');
     88        console.log('                   "x": x coordinate array of cities. (ex: [0.0, 10.0, -25.0,...])');
     89        console.log('                   "y": y coordinate array of cities. (ex: [0.0, 10.0, -25.0,...])');
     90        console.log('                   "z": z coordinate array of cities. (ex: [0.0, 10.0, -25.0,...])');
     91        console.log('           "graticule": render graticule. (ex: {"enabled":true})');
     92        console.log('                   "enabled": toggle graticule (default false, ex: true)');
     93        console.log('                   "scale": scale graticule factor (default 1.0, ex: 1.004)');
     94        console.log('                   "x": x coordinate array. (ex: [0.0, 10.0, -25.0,...])');
     95        console.log('                   "y": y coordinate array. (ex: [0.0, 10.0, -25.0,...])');
     96        console.log('                   "z": z coordinate array. (ex: [0.0, 10.0, -25.0,...])');
     97        console.log('       "view": object cotaining view parameters. See webgl.js for defaults. (ex: {"position":[0.0,0.0,0.0],"rotation":[0.0,0.0,0.0],"zoom":1.0,"zoomLimits":[0.01,100.0],"azimuthLimits":[-180,180.0],"elevationLimits":[-90,90.0],"panningEnabled":false,"twod":false})');
     98        console.log('           "position": camera position (ex: [0.0,0.0,0.0])');
     99        console.log('           "rotation": camera rotation (ex: [0.0,0.0,0.0])');
     100        console.log('           "zoom": initial camera zoom as a percentage of default (default 1, ex: 1.5, 0.01)');
     101        console.log('           "zoomLimits": zoom view limits (ex: [0.05, 10])');
     102        console.log('                   "azimuthLimits": zoom view limits (ex: [0.05, 10])');
     103        console.log('           "elevationLimits": zoom view limits (ex: [0.05, 10])');
     104        console.log('           "panningEnabled": controls panning with shift + drag mouse or pan gestures (default: false, ex: true)');
     105        console.log('           "twod": controls twod orthographic view (default: false, ex: true)');
    59106        console.log('       "xlim": x coordinates to fit inside camera (ex: [0, 500])');
    60107        console.log('       "ylim": y coordinates to fit inside camera (ex: [0, 500])');
    61108        console.log('       "zlim": z coordinates to fit inside camera (ex: [0, 500])');
    62         console.log('       "zoomlim": zoom view limits (ex: [0.05, 10])');
    63         console.log('       "zoom": initial camera zoom as a percentage of default (default 1, ex: 1.5, 0.01)');
    64         console.log('       "cloud*": plot a cloud of points, given a flat array of 3d coordinates (ex: [0.0, 0.0, 0.0, 1.0, 1.0, 1.0])');
    65         console.log('       "expdisp*": plot exp file on top of a data plot. provide exp file as an argument (use a cell of strings if more than one)');
    66         console.log('       "textlabels*": plot text labels rendered in 3d space, using an array of text/coordinate pairs (ex: [{"pos":[0.0,0.0,0.0],"text":"origin"}])');
     109        console.log('       "transient_field_data": array of data objects (ex: [[0.0,1.0, 2.5, 12.0...],[0.0,1.0, 2.5, 12.0...],...])');
     110        console.log('       "textlabels": plot text labels rendered in 3d space, using an array of text/coordinate pairs (ex: [{"pos":[0.0,0.0,0.0],"text":"origin"}])');
    67111       
    68112        console.log('  ');
Note: See TracChangeset for help on using the changeset viewer.