MATLAB: Change LineWidth / LineStyle of stepplot() / bodeplot()

bodeplot

How can I change the LineWidth / LineStyle properties of a stepplot() Figure? From the Example :
sys = tf(4,[1 0.5 4]);
h = bodeplot(sys);
So how does one change Linewidth of this bode plot? I can add LineStyle properties when using h=bodeplot(sys,'–) e.g., yet if I acces the properties of bodeplot like discribed in the doc:
p = getoptions(h);
There are just no Line properaties at all.
€:2016a

Best Answer

The Control System Toolbox plotting functions are resistant to most attempts to modify their plot characteristics. If I want a customised plot, I ask for the outputs from the bode, then plot them as ordinary subplot plots:
[mag,phase,wout] = bode(sys);
Example —
sys = tf(4,[1 0.5 4]);
[mag,phase,wout] = bode(sys);
figure(1)
subplot(2,1,1)
semilogx(wout, 20*log10(squeeze(mag)), '-r', 'LineWidth',2)
grid
subplot(2,1,2)
semilogx(wout, squeeze(phase), '-r', 'LineWidth',2)
grid