1 | function plotdoc() { //{{{
|
---|
2 | //PLOTDOC - plot documentation
|
---|
3 | //
|
---|
4 | // Usage:
|
---|
5 | // plotdoc()
|
---|
6 |
|
---|
7 | //TODO: Standardize image to overlay_image, heightscale to scaling, colorbarfontsize/color, clarify innermask/outermask, edgecolor implementation, check colormap,
|
---|
8 |
|
---|
9 | console.log(' WARNING: starred methods (*) are experimental and not guarenteed to be stable');
|
---|
10 | console.log(' Plot usage: plotmodel(model,varargin)');
|
---|
11 | console.log(' Options: ');
|
---|
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(' "2d": renders orthographic camera with view set to [0, 90] (default "off", ex: "on", "off")');
|
---|
19 | console.log(' "backgroundcolor": plot background color. (default "lightcyan", ex: "green","blue")');
|
---|
20 | console.log(' "brush": specify brush options (default {"strength":0.075,"falloff":0.5})');
|
---|
21 | console.log(' "caxis": modify colorbar range. (array of type [a, b] where b>=a)');
|
---|
22 | console.log(' "colorbar": add colorbar (default "off", ex: "on", "off")');
|
---|
23 | console.log(' "colorbarid": colorbar canvas id (string)');
|
---|
24 | console.log(' "colorbartitle": colorbar title (string)');
|
---|
25 | console.log(' "colorbarnticks": number of colorbar ticks (default 6, ex: 2, 10)');
|
---|
26 | console.log(' "colorbarprecision": colorbar label digit precision (default 3, ex: 1, 4)');
|
---|
27 | console.log(' "colorbarinnerlabels": choose whether labels are inside colorbar (default "off", ex: "on", "off")');
|
---|
28 | console.log(' "colorbarfontsize": specify colorbar font size (default 1, ex: 14, 22)');
|
---|
29 | console.log(' "colorbarfontcolor": specify colorbar font color (default "black", ex: "green","blue")');
|
---|
30 | console.log(' "colorbarwidth": multiplier (default 1) to the default width colorbar');
|
---|
31 | console.log(' "colorbarheight": multiplier (default 1) to the default height colorbar');
|
---|
32 | console.log(' "colormap": same as standard matlab option (default "jet", ex: "hsv","cool","spring","gray","Ala","Rignot",...)');
|
---|
33 | 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"]}');
|
---|
38 | console.log(' "displayview": print view value to console (default "off", ex: "on", "off")');
|
---|
39 | console.log(' "displayzoom": print zoom value to console (default "off", ex: "on", "off")');
|
---|
40 | console.log(' "edgecolor": same as standard matlab option EdgeColor (default "black", ex: color name: "blue" or RGB array: [0.5, 0.2, 0.8])');
|
---|
41 | 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)');
|
---|
43 | console.log(' "log": value of log (default 10, ex: 2, Math.E)');
|
---|
44 | 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})');
|
---|
46 | 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")');
|
---|
47 | 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")');
|
---|
48 | console.log(' "overlay": overlay a radar amplitude image behind (default "off", ex: "on", "off")');
|
---|
49 | console.log(' "overlay_image": path to overlay image (default "", ex: "./images/radar.png")');
|
---|
50 | console.log(' "quiver": add quiver plot overlay for velocities. (default "off", ex: "on", "off")');
|
---|
51 | console.log(' "scaling": scaling factor used by quiver plots. Default is 0.4');
|
---|
52 | 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]');
|
---|
59 | console.log(' "xlim": x coordinates to fit inside camera (ex: [0, 500])');
|
---|
60 | console.log(' "ylim": y coordinates to fit inside camera (ex: [0, 500])');
|
---|
61 | 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"}])');
|
---|
67 |
|
---|
68 | console.log(' ');
|
---|
69 | console.log(' Examples:');
|
---|
70 | console.log(' plotmodel(md,"data","vel","data","mesh","view#2",3,"colorbar#all","on")');
|
---|
71 | console.log(' plotmodel(md,"data",md.geomtery.surface)');
|
---|
72 | } //}}}
|
---|