How to change the thickness of grid lines in pzplot() or in pzmap()
Show older comments
Hello,
I'm trying to change the thickness of grid lines in pole-zero plot which is plotted using pzplot() command. I could only turn-on and off the grid using "zgrid" command.
Can any one help.
Following is the code i'm trying out.
%example transfer function
T=tf([1 1 1],[1 1 1 1 1]);
Ts=1/10000;
% tranasferfunction in z domain.
Tz=c2d(T,Ts);
figure;
pzplot(Tz);
zgrid;
Answers (2)
Walter Roberson
on 10 Aug 2017
0 votes
2 Comments
NAGA BRAHMENDRA
on 13 Aug 2017
Walter Roberson
on 13 Aug 2017
Ah. That facility is not designed to make it convenient to change the grid lines.
ax = gca();
L = findall(ax, 'type', 'line'); %findall is important
Now at this point change either
L(1).LineWidth = 2;
or
L(2).LineWidth = 2;
I do not know which of the two is considered the z axes. The first of the two is the lines that run from edge to edge, and the second of the two is the lines that are more or less concentric.
It is now simple to do this via the pzplot chart API.
h = pzplot(drss(3)); %Create chart
h.AxesStyle.GridVisible = "on"; %Enable z-grid
h.AxesStyle.GridLineWidth = 3; %Thicken grid line
Categories
Find more on Stability Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!