How to align X and Y axis to middle of plot?
70 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Cameron
2023-4-28
t = 0:5:360;
x = cosd(t);
y = sind(t);
p = plot(x,y);
p.Parent.XAxisLocation = "origin";
p.Parent.YAxisLocation ="origin";
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Filter Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!