当前位置:网站首页>Matlab sets the size of graphics window and image and the position of legend
Matlab sets the size of graphics window and image and the position of legend
2022-07-28 11:59:00 【Za г athustra】
Look at the code step by step
clear
close all
t = 0:0.01:2;
x = sin(2*pi*t);
plot(t,x,'k','linewidth',2) Post run output

Add code set(gcf,'unit','centimeters','position',[3 5 10 6])
This is to set the position and size of the graph . Unit: cm , The coordinates of the starting point of the drawing are (3cm,5cm) Indicates that the lower left point is away from the left boundary of the display 10cm, From the lower boundary 5cm, The border size is (10cm,6cm)
clear
close all
t = 0:0.01:2;
x = sin(2*pi*t);
plot(t,x,'k','linewidth',2)
set(gcf,'unit','centimeters','position',[3 5 10 6])
Continue to set the actual graph in figure The proportion of ,set(gca,'Position',[.1 .3 .2 .5]) The left margin , Bottom margin , wide , high xmin,ymin,width,height
clear
close all
t = 0:0.01:2;
x = sin(2*pi*t);
plot(t,x,'k','linewidth',2)
set(gcf,'unit','centimeters','position',[3 5 10 6])
set(gca,'Position',[.1 .3 .2 .5]);
legend Put it outside ,legend({'sin'}, 'location','SouthEastOutside')
however legend It will also occupy the graphic space
clear
close all
t = 0:0.01:2;
x = sin(2*pi*t);
plot(t,x,'k','linewidth',2)
set(gcf,'unit','centimeters','position',[3 5 10 6])
set(gca,'Position',[.1 .3 .2 .5]);
legend({'sin'},'location','SouthEastOutside')
Reference resources
MATLAB How to set the picture size in ?_ Magic forest blog -CSDN Blog _matlab Picture size
matlab in set position,Matlab in set function _GameFinder The blog of -CSDN Blog
边栏推荐
- Upgrading of computing power under the coordination of software and hardware, redefining productivity
- Update dev (development version) of the latest win11
- Unitywebrequest is used in unity to load network and local pictures
- [pyGame practice] the super interesting bubble game is coming - may you be childlike and always happy and simple~
- DNS series (III): how to avoid DNS spoofing
- Application of mobile face stylization Technology
- R language - some metrics for unbalanced data sets
- [pyGame practice] when the end of the world comes, how long can you live in a cruel survival game that really starts from scratch?
- Software testing and quality learning notes 1 --- black box testing
- [geek challenge 2019] babysql-1 | SQL injection
猜你喜欢

A hundred flowers bloom in data analysis engines. Why invest heavily in Clickhouse?

Shell (II)

14. User web layer services (II)

14、用户web层服务(二)

Modify the running container port mapping

Zotero document manager and its use posture (updated from time to time)

Know the optical fiber interface and supporting optical fiber cable of can optical fiber converter in fire alarm networking

PFP会是数字藏品的未来吗?

Untiy中控制Animation的播放速度
![[general database integrated development environment] Shanghai daoning provides you with Aqua Data Studio downloads, tutorials, and trials](/img/46/830b7703ae7cbfa6051137061560c2.png)
[general database integrated development environment] Shanghai daoning provides you with Aqua Data Studio downloads, tutorials, and trials
随机推荐
Excel shortcut keys (letters + numbers) Encyclopedia
Know the optical fiber interface and supporting optical fiber cable of can optical fiber converter in fire alarm networking
瑞吉外卖——Day01
R language - some metrics for unbalanced data sets
PFP会是数字藏品的未来吗?
Character function and string function (Part 1)
一些知识概念
A lock faster than read-write lock. Don't get to know it quickly
Solutions to the disappearance of Jupiter, spyder, Anaconda prompt and navigator shortcut keys
Autumn recruit offer harvesters, and take the offers of major manufacturers at will
R language uses LM function to build regression model, uses the augmented function of bloom package to store the model results in dataframe, and uses ggplot2 to visualize the regression residual diagr
Alexnet - paper analysis and reproduction
【补题日记】[2022牛客暑期多校2]L-Link with Level Editor I
Code simplification
一些多参数函数的具体作用
Opencv notes sorting [Hough transform]
[diary of supplementary questions] [2022 Niuke summer multi school 2] D-Link with game glitch
Alexnet - paper analysis and reproduction
直接插入排序与希尔排序
OsCache缓存监控刷新工具