How to make the marker width more thicker

I have plot the data but what i want is to make the marker more thicker, so that it can be more clearly visible . I have attached the code .i would be grateful if you could help me .Thank you in advance .

 Akzeptierte Antwort

Ive J
Ive J am 16 Dez. 2020

2 Stimmen

Set LineWidth when calling plot function.
plot(rand(10, 1), rand(10, 1), 'bo','LineWidth', 2)

6 Kommentare

Cris LaPierre
Cris LaPierre am 16 Dez. 2020
See here:
"Line width, specified as a positive value in points, where 1 point = 1/72 of an inch. If the line has markers, then the line width also affects the marker edges."
DEWDROP
DEWDROP am 18 Dez. 2020
Thank you ,it worked
Kamilu Sanusi
Kamilu Sanusi am 1 Mai 2023
@Ive J, Hi, I have a similar problem, but linewidth is not working for marker on pzmap, pls kindly assist and if i intend to connect the marker together, please how do I adjust my program to implement that? Thank you
Ive J
Ive J am 2 Mai 2023
Bearbeitet: Ive J am 2 Mai 2023
It's better to post a new question, but regardless you can access the ax children and modify the properties as desired:
H = tf([2 5 1],[1 3 5]);
pzmap(H)
grid on
ax = gca;
li = ax.Children(1).Children;
for k = 1:numel(li)
li(k).LineStyle = "-";
li(k).LineWidth = 2;
end
Zach Leo
Zach Leo am 11 Jul. 2023
What if we need thin line but thicker marker edges?
The plot function provides the name-value arguments Marker, MarkerIndices, MarkerEdgeColor, MarkerFaceColor, and MarkerSize so that you can customize the appearance of markers. Use the name-value argument MarkerSize to change the size of the marker.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Kamilu Sanusi
Kamilu Sanusi am 21 Mai 2023
Bearbeitet: Image Analyst am 21 Mai 2023
@Ive J, Please I would like you to help me on this problem of mine, thank you
Given the following elements of matrix A, three matrices are intended to be generated using different variable D as D = 0, D = 4 and D = 70. The poles resulting from this matrices are to be plotted using different Marker, and the marker is inted to be bold, not necessarily big in size. I tried but im getting the error
''Assigning to 2 elements using a simple assignment statement is not supported. Consider using comma-separated list assignment''.
Any assistance would be highly appreciated.
Thank you
Ta1 = 24; Ta2 = 27; Ta3= 20;
H11 = -0.0641; H12 = 0.0359;
H21 = 0.1176; H22 = -0.2057;
H31 = 0.2077; H32 = 0.1961;
for D = [0 4 70]
A = [0 0 1 0 -1;0 0 0 1 -1;(-H11/Ta1) (-H12/Ta1) (-D/Ta1) 0 0;...
(-H21/Ta2) (-H22/Ta2) 0 (-D/Ta2) 0;(-H31/Ta3) (-H32/Ta3) 0 0 (-D/Ta3)];
Eig = eig(A);
a = Eig(1,1);
b = Eig(2,1);
c = Eig(3,1);
d = Eig(4,1);
e = Eig(5,1);
s = tf('s');
T = (1)/((s-a)*(s-b)*(s-c)*(s-d)*(s-e));
ax = gca;
P = pole(T);
if D == 0
pzmap(T)
PZP = findobj(ax, 'Tag', 'PZ_Pole')
PZP.Marker = 'v';
PZP.MarkerSize = 8;
PZP.Color = 'r';
end
hold on
if D == 7
pzmap(T);
PZP = findobj(ax, 'Tag', 'PZ_Pole')
PZP.Marker = 'd';
PZP.MarkerSize = 8;
PZP.Color = 'k';
end
hold on
if D == 70
pzmap(T);
pzmap(T);
PZP = findobj(ax, 'Tag', 'PZ_Pole')
PZP.Marker = '*';
PZP.MarkerSize = 8;
PZP.Color = 'y';
end
end
PZP =
Line (PZ_Pole) with properties: Color: [0 0.4470 0.7410] LineStyle: 'none' LineWidth: 0.5000 Marker: 'x' MarkerSize: 7 MarkerFaceColor: 'none' XData: [-0.1505 -0.0885 0.1505 0.0885 9.9556e-18] YData: [0 0 0 0 0] ZData: [1×0 double] Show all properties
PZP =
3×1 Line array: Line (PZ_Pole) Line (PZ_Pole) Line (PZ_Pole)
Assigning to 3 elements using a simple assignment statement is not supported. Consider using comma-separated list assignment.

3 Kommentare

Look at PZP. It's an array so you need to assign each one, one at a time. Perhaps like
for k = 1 : numel(PZP)
PZP(k).Marker = '*';
PZP(k).MarkerSize = 8;
PZP(k).Color = 'y';
end
Kamilu Sanusi
Kamilu Sanusi am 21 Mai 2023
@Image Analyst, please i got this error while using your suggeted input
Unrecognized function or variable 'PZP'.
Error in pzmap2 (line 168)
for k = 1 : numel(PZP)
Please ckindly help me effect the corrections in the code.
Thank you
Beginning in R2024b, the MarkerSize in a "pzplot" can be updated using the property.
pzp = pzplot(zpk(-1,[-2 -3],1));
pzp.Responses(1).MarkerSize = 10;
There are also properties on other linear analysis plots that allow customization of the style.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Color and Styling finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 16 Dez. 2020

Kommentiert:

am 13 Nov. 2025

Community Treasure Hunt

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

Start Hunting!

Translated by