How to align X and Y axis to middle of plot?

66 Ansichten (letzte 30 Tage)
DESIREDDY SHASHIDHAR REDDY
DESIREDDY SHASHIDHAR REDDY am 28 Apr. 2023
t = 0:5:360;
x = 10+cosd(t);
y = 10+sind(t);
plot(x,y);
How do I align the x and y axis to the centre of the plot similar to this attached image.

Antworten (1)

Cameron
Cameron am 28 Apr. 2023
t = 0:5:360;
x = cosd(t);
y = sind(t);
p = plot(x,y);
p.Parent.XAxisLocation = "origin";
p.Parent.YAxisLocation ="origin";
  1 Kommentar
DESIREDDY SHASHIDHAR REDDY
DESIREDDY SHASHIDHAR REDDY am 28 Apr. 2023
what if data is not centred on 0,0
t = 0:5:360;
x = 10+cosd(t);
y = 10+sind(t);
plot(x,y);

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by