How to change the thickness of grid lines in pzplot() or in pzmap()

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)

2 Comments

Thank you for your reply. I could turn-on and off the grid with the property editors. I couldn't change the thickness of z-grid lines in "pzplot".
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.

Sign in to comment.

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

Tags

Asked:

on 10 Aug 2017

Answered:

on 1 Jun 2026

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!