How to set the plot box to particular size

17 Ansichten (letzte 30 Tage)
Ole
Ole am 24 Sep. 2021
Bearbeitet: Ole am 24 Sep. 2021
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])

Antworten (0)

Kategorien

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

Tags

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by