zlin
zlin

Reputation: 195

MATLAB how to turn off the yaxis created by 'yyaxis' command?

How to turn off (totally) a yaxis in a Matlab figure?

Google only tell me how to create an extra yaxis.

Appreciate any help.

Upvotes: 2

Views: 5759

Answers (1)

Poelie
Poelie

Reputation: 713

Use the axis handle to modify either y axis.

hfig=figure;
hax=axes;
yyaxis(hax,'left')
hax.YAxis(1).Visible='off'; % Removes left axis
hax.YAxis(2).Visible='off'; % Removes right axis

Upvotes: 1

Related Questions