Back to Data Visualization
hold
Hold current plot
Syntax
hold
hold('on')
hold('off')Description
Controls whether new plot commands add to or replace the current chart. When hold is on, successive plot commands add datasets to the same chart.
Parameters
| Name | Description |
|---|---|
| state(optional) | 'on' or 'off' (default: toggle) |
Returns
null
Examples
Try It
>> plot([1 2 3]);
hold('on');
bar([2 3 4])