|
76 | 76 | <ul> |
77 | 77 |
|
78 | 78 | <li> |
79 | | - <a href='javascript:loadHistogramCharts(0,0,2,2)'>Show Histogram</a> <span class='smallCoords'>at row: 0, col: 0, w:2 h: 2</span> |
| 79 | + <a href='javascript:load2DScatter(0,0,2,2)'>Show Plotly Scatter </a> <span class='smallCoords'>at row: 0, col: 0, w:2 h: 2</span> |
80 | 80 | </li> |
81 | 81 | <li> |
82 | | - <a href="javascript:loadSurface(0,2,2,2)">Show Surface</a><span class='smallCoords'>at row: 0, col: 2, w: 2, h: 2</span> |
| 82 | + <a href="javascript:loadSurface(0,2,2,2)">Show Surface </a><span class='smallCoords'>at row: 0, col: 2, w: 2, h: 2</span> |
83 | 83 | </li> |
84 | 84 | <li> |
85 | | - <a href="javascript:loadBar(2,0,3,3)">Show Bar chart</a><span class='smallCoords'>at row: 2, col: 0, w: 3, h: 3</span> |
| 85 | + <a href="javascript:loadBar(2,0,3,3)">Show Bar chart </a><span class='smallCoords'>at row: 2, col: 0, w: 3, h: 3</span> |
86 | 86 | </li> |
87 | 87 | <li> |
88 | | - <a href="javascript:loadPie(2,3,3,3)">Show Pie Chart</a><span class='smallCoords'>at row: 2, col: 3, w: 3. h: 3</span> |
| 88 | + <a href="javascript:loadPie(2,3,3,3)">Show Pie Chart </a><span class='smallCoords'>at row: 2, col: 3, w: 3. h: 3</span> |
89 | 89 | </li> |
90 | 90 | <li> |
91 | | - <a href="javascript:loadDensity(4,0,3,3)">Show Histogram2dContour</a><span class='smallCoords'>at row: 4, col: 0, w: 3, h: 3</span> |
| 91 | + <a href="javascript:loadDensity(4,0,3,3)">Show Histogram2dContour </a><span class='smallCoords'>at row: 4, col: 0, w: 3, h: 3</span> |
92 | 92 | </li> |
93 | 93 | <li> |
94 | | - <a href="javascript:loadBox(4,3,3,3)">Show Box</a><span class='smallCoords'>at row: 4, col: 3, w: 3, h: 3</span> |
| 94 | + <a href="javascript:loadBox(4,3,3,3)">Show Box </a><span class='smallCoords'>at row: 4, col: 3, w: 3, h: 3</span> |
95 | 95 | </li> |
96 | 96 | </ul> |
97 | 97 | </body> |
|
111 | 111 | return document.getElementById('sTarget').value; |
112 | 112 | } |
113 | 113 |
|
| 114 | + function load2DScatter(r,c,w,h) { |
| 115 | + firefly.getViewer().addCell(r,c,w,h, 'xyPlots', 'newChartContainer'); |
| 116 | + |
| 117 | + var trace1 = { |
| 118 | + tbl_id: "wiseCatTbl", |
| 119 | + x: "tables::w1mpro-w2mpro", |
| 120 | + y: "tables::w2mpro-w3mpro", |
| 121 | + mode: 'markers', |
| 122 | + type: 'scatter', |
| 123 | + error_x : {array: "tables::w3sigmpro"}, |
| 124 | + error_y : {array: "tables::w4sigmpro"}, |
| 125 | + marker: {size: 4, opacity: 0.5} |
| 126 | + }; |
| 127 | + |
| 128 | + var layoutS = { |
| 129 | + title: 'Color-Color', |
| 130 | + xaxis: {title: 'w1mpro-w2mpro (mag)'}, |
| 131 | + yaxis: {title: 'w2mpro-w3mpro (mag)'} |
| 132 | + }; |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + firefly.getViewer().showPlot( |
| 137 | + {chartId: 'newChart1', layout: layoutS, data: [trace1]}, |
| 138 | + 'newChartContainer'); |
| 139 | + |
| 140 | + } |
| 141 | + |
| 142 | + function load3DChart(r,c,w,h) { |
| 143 | + firefly.getViewer().addCell(r,c,w,h, 'xyPlots', '3dChartContainer'); |
| 144 | + |
| 145 | + |
| 146 | + var data3d = [ |
| 147 | + { |
| 148 | + tbl_id: "wiseCatTbl", |
| 149 | + type: 'scatter3d', |
| 150 | + name: 'color-color-color', |
| 151 | + x: "tables::w1mpro-w2mpro", |
| 152 | + y: "tables::w2mpro-w3mpro", |
| 153 | + z: "tables::w3mpro-w4mpro", |
| 154 | + mode : 'markers', |
| 155 | + marker : { |
| 156 | + size: 3, |
| 157 | + line: { |
| 158 | + color: 'rgb(127, 127, 127, 0.14)', |
| 159 | + width: 1 |
| 160 | + } |
| 161 | + }, |
| 162 | + hoverinfo: 'x+y+z' |
| 163 | + } |
| 164 | + ]; |
| 165 | + |
| 166 | + var tfont = {size: 11}; |
| 167 | + var layout3d = { |
| 168 | + title: 'color-color-color', |
| 169 | + scene:{ |
| 170 | + xaxis: { |
| 171 | + title: 'w1-w2 (mag)', |
| 172 | + titlefont: tfont |
| 173 | + }, |
| 174 | + yaxis: { |
| 175 | + title: 'w2-w3 (mag)', |
| 176 | + titlefont: tfont |
| 177 | + }, |
| 178 | + zaxis: { |
| 179 | + title: 'w3-w4 (mag)', |
| 180 | + titlefont: tfont |
| 181 | + } |
| 182 | + } |
| 183 | + }; |
| 184 | + |
| 185 | + firefly.getViewer().showPlot( |
| 186 | + {chartId: 'newChart3', layout: layout3d, data: data3d }, |
| 187 | + '3dChartContainer'); |
| 188 | + } |
114 | 189 |
|
115 | 190 | function loadHistogramCharts(r,c,w,h) { |
116 | 191 | firefly.getViewer().addCell(r,c,w,h, 'xyPlots', 'histContainer'); |
|
187 | 262 | var dataPie = [ |
188 | 263 | { |
189 | 264 | tbl_id: "wiseCatTbl", |
190 | | - name: 'Area', |
| 265 | + name: 'Stats for (w1+w2)', |
191 | 266 | type: 'pie', |
192 | | - values: "tables::w1mpro", |
| 267 | + values: "tables::w1mpro+w2mpro", |
193 | 268 | labels: "tables::clon", |
194 | 269 | textinfo: 'none' |
195 | 270 | }]; |
196 | 271 |
|
197 | 272 | var layoutPie = { |
198 | | - title: 'pie: w1mpro vs. clon', |
| 273 | + title: 'pie: w1+w2 vs. clon', |
199 | 274 | showlegend: true |
200 | 275 | }; |
201 | 276 |
|
|
233 | 308 | var dataSurface = [ |
234 | 309 | { |
235 | 310 | type: 'surface', |
236 | | - name: 'w1-ra-dec', |
| 311 | + name: 'w1-w2-w3', |
237 | 312 | tbl_id: "wiseCatTbl", |
238 | | - x: "tables::ra", |
239 | | - y: "tables::dec", |
| 313 | + x: "tables::w1mpro-w2mpro", |
| 314 | + y: "tables::w2mpro-w3mpro", |
240 | 315 | z: "tables::w1mpro", |
241 | 316 | hoverinfo: 'x+y+z' |
242 | 317 | } |
243 | 318 | ]; |
244 | 319 |
|
245 | 320 | var tfont = {size: 11}; |
246 | 321 | var layoutSurface = { |
247 | | - title: 'Surface on ra & dec', |
| 322 | + title: 'Surface on w1-w2 & w2-w3', |
248 | 323 | scene:{ |
249 | 324 | xaxis: { |
250 | | - title: 'ra (deg)', |
| 325 | + title: 'w1-w2 (deg)', |
251 | 326 | titlefont: tfont |
252 | 327 | }, |
253 | 328 | yaxis: { |
254 | | - title: 'dec (deg)', |
| 329 | + title: 'w2-w3 (deg)', |
255 | 330 | titlefont: tfont |
256 | 331 | } |
257 | 332 | } |
|
269 | 344 | var dataBox = [ |
270 | 345 | { |
271 | 346 | type: 'box', |
272 | | - name: 'w1mpro', |
| 347 | + name: 'w1+w2', |
273 | 348 | tbl_id: "wiseCatTbl", |
274 | | - y: "tables::w1mpro" |
| 349 | + y: "tables::w1mpro+w2mpro" |
275 | 350 | }, |
276 | 351 | { |
277 | 352 | type: 'box', |
278 | | - name: 'w2mpro', |
| 353 | + name: 'w2+w3', |
279 | 354 | tbl_id: "wiseCatTbl", |
280 | | - y: "tables::w2mpro" |
| 355 | + y: "tables::w2mpro+w3mpro" |
281 | 356 | } |
282 | 357 | ]; |
283 | 358 |
|
|
0 commit comments