File tree 1 file changed +28
-18
lines changed
1 file changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -239,31 +239,41 @@ x = [x0; x1];
239
239
y = [y0; y1];
240
240
241
241
trace1 = struct(...
242
- 'x', x0, ...
243
- 'y', y0, ...
244
- 'mode', 'markers', ...
245
- 'marker', struct(...
246
- 'symbol', 'circle', ...
247
- 'opacity', 0.7), ...
248
- 'type', 'scatter');
242
+ 'x', x0, ...
243
+ 'y', y0, ...
244
+ 'mode', 'markers', ...
245
+ 'marker', struct(...
246
+ 'symbol', 'circle', ...
247
+ 'opacity', 0.7), ...
248
+ 'type', 'scatter');
249
249
250
250
trace2 = struct(...
251
- 'x', x1, ...
252
- 'y', y1, ...
253
- 'mode', 'markers', ...
254
- 'marker', struct(...
255
- 'symbol', 'square', ...
256
- 'opacity', 0.7), ...
257
- 'type', 'scatter');
251
+ 'x', x1, ...
252
+ 'y', y1, ...
253
+ 'mode', 'markers', ...
254
+ 'marker', struct(...
255
+ 'symbol', 'square', ...
256
+ 'opacity', 0.7), ...
257
+ 'type', 'scatter');
258
258
259
259
trace3 = struct(...
260
- 'x', x, ...
261
- 'y', y, ...
262
- 'type', 'histogram2d');
260
+ 'x', x, ...
261
+ 'y', y, ...
262
+ 'type', 'histogram2d');
263
263
264
264
data = {trace1, trace2, trace3};
265
265
266
- plotly(data);
266
+ layout = struct(...
267
+ 'legend', struct(...
268
+ 'y', 1.0, ...
269
+ 'yanchor', 'bottom', ...
270
+ 'x', 1.0, ...
271
+ 'xanchor', 'right'), ...
272
+ 'xaxis', struct('zeroline', false), ...
273
+ 'yaxis', struct('zeroline', false) ...
274
+ );
275
+
276
+ plotly(data, struct('layout', layout));
267
277
```
268
278
269
279
<!-- ------------------- EXAMPLE BREAK ------------------------->
You can’t perform that action at this time.
0 commit comments