How do I create an axes on a figure?

43 次查看(过去 30 天)
I use this line
handles.axes7 = axes('Units','normalized','Position',[5.2 11.923 19.2 7.769]);
But it doesn't seem to work

采纳的回答

Stephen23
Stephen23 2018-6-21
编辑:Stephen23 2018-6-21
Your units and position are incongruous. If you use 'normalized' then all of the position values will (almost always) be between zero and one. This is explained in the axes properties page:
which states for normalized units: "Normalized with respect to the container, which is typically the figure or a panel. The lower left corner of the container maps to (0,0) and the upper right corner maps to (1,1)."
If (0,0) is the lower left of the figure and (1,1) is upper right of the figure, as the documentation clearly states, where do you think your axes lower left point (5.2,11.923) will be? (hint: waaaay outside the figure boundaries). And you specified the axes to be 19.2 times the width of the figure and 7.769 times as high: these axes are so huge, you would only ever see 0.67% of the axes inside the figure, even if you moved its lower-left corner so that it was visible.
Hint: if you are using normalized units then (0.5,0.5) is in the center of the figure.
  7 个评论
Stelios Fanourakis
Stelios Fanourakis 2018-6-21
Normal size for a logo. Small enough but not tiny. Still am trying to accomplish it
Stephen23
Stephen23 2018-6-21
编辑:Stephen23 2018-6-21
"Normal size for a logo."
Well, I don't know any computer that will understand that command, so you will have to figure out what a "normal size" means in some real units that computers will understand, e.g. pixels, cm, inches, etc, then set the units and position. It is that simple.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by