tags:

views:

619

answers:

1

I'm doing some data analysis in Matlab, and anytime I call the hold function to keep plotting to the current figure, I get an output like this:

Current plot held

I'd like to avoid this print, since it's just ugly and clutters my output. Unfortunately, placing a ; after the command does not silence it.

Is there something I can do (save from reworking my display code to avoid 'hold' commands altogether)?

+13  A: 

Hi,

Looks like the hold command displays "Current plot held" if you call it with the axis handle as the sole parameter, eg

>> hold(gca)
Current plot released
>> hold(gca)
Current plot held

However, if you tell it the hold state you want then the output is suppressed, eg,

>> hold(gca,'on')
>>

You could also call hold in the following manner

>> axes(axesHandle)
>> hold on % or hold('on') if you prefer calling it as a function

If you want to avoid using the hold command/function, you could set the nextplot property of the axis to add, eg

>> axesHandle=axes;
>> set(axesHandle,'nextplot','add')
Azim
Thanks, that's exactly what I needed.
Kena

related questions