|
70 | 70 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
71 | 71 | % DEVELOPER NOTE: |
72 | 72 | % We actually plot a fifth 'dummy' plot which contains both the line and marker |
73 | | -% styles. This is the only plot which has 'handlevis', 'on', and so will be |
74 | | -% included in subsequent calls to LEGEND(). The handle to this plot is included |
75 | | -% as the fifth output, and the plot itself is set to 'visible', 'off'. Note |
76 | | -% that if a user modifies the plot by adjusting HLINE or HPOINT, subsequent |
77 | | -% calls the LEGEND will not have the updated style. There's no way to get |
78 | | -% around this without a complicated callback procedure. |
| 73 | +% styles. This is the only plot which has 'handlevisibility', 'on', and so will |
| 74 | +% be included in subsequent calls to LEGEND(). The handle to this plot is |
| 75 | +% included as the fifth output, and the plot itself is set to 'visible', 'off'. |
| 76 | +% Note that if a user modifies the plot by adjusting HLINE or HPOINT, |
| 77 | +% subsequent calls the LEGEND will not have the updated style. There's no way |
| 78 | +% to get around this without a complicated callback procedure. |
79 | 79 | % |
80 | 80 | % Note, to clarify, the reason we need all this is that we must plot the line |
81 | 81 | % and points as different plots. MATLAB/PLOT() doesn't have this problem. |
|
422 | 422 | end |
423 | 423 |
|
424 | 424 | % We don't want these guys to be included in LEGEND(), so we turn them off. |
425 | | -set(h1, 'handlevis', 'off'); |
426 | | -set(h2, 'handlevis', 'off'); |
427 | | -set(h3, 'handlevis', 'off'); |
428 | | -set(h4, 'handlevis', 'off'); |
| 425 | +set(h1, 'handlevisibility', 'off'); |
| 426 | +set(h2, 'handlevisibility', 'off'); |
| 427 | +set(h3, 'handlevisibility', 'off'); |
| 428 | +set(h4, 'handlevisibility', 'off'); |
429 | 429 |
|
430 | 430 | % Ensure that the both the handle for the dummy plot and the dummy plot itself |
431 | 431 | % are visible for LEGEND(). The dummy plot could in theory have its 'Visible' |
432 | 432 | % property set to 'off', but the data is NaN, so it doesn't draw anything |
433 | 433 | % anyway. Moreover, if 'Visible' is 'off', the entries in the legend will be |
434 | 434 | % grayed out in R2016b and later. |
435 | | -set(hDummy, 'handlevis', 'on', 'visible', 'on'); % ¯\_(o.O)_/¯ |
| 435 | +set(hDummy, 'handlevisibility', 'on', 'visible', 'on'); % ¯\_(o.O)_/¯ |
436 | 436 |
|
437 | 437 | % Give an output to the plot handles if requested: |
438 | 438 | if ( nargout > 0 ) |
|
550 | 550 |
|
551 | 551 | % Plot the markers and match the color with the delta lines: |
552 | 552 | hjj = plot(xData(jj), yFinish(jj), marker, ... |
553 | | - 'markersize', 6, 'linestyle', 'none', 'handlevis', 'off'); |
| 553 | + 'markersize', 6, 'linestyle', 'none', 'handlevisibility', 'off'); |
554 | 554 | set(hjj, 'color', get(h(j), 'color')); |
555 | 555 | set(hjj, 'markerfacecolor', get(h(j), 'color')) |
556 | 556 | end |
|
0 commit comments