How to set the plot box to particular size

16 次查看(过去 30 天)
How to set the plot box to pixel size.
x = linspace(1,20,100);
y = x.^2;
figure(1)
plot(x,y)
xlabel('X')
ylabel('Y')
The code below will set the figure size. Instead I would like only the plot box without labels to have the size of 200x500.
x0=10;
y0=10;
width = 500;
height = 200;
set(gcf,'position',[x0,y0,width,height])

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by