Is it possible to draw a plot in a frame uicontrol in MATLAB?
3 ビュー (過去 30 日間)
古いコメントを表示
I would like to draw a plot in a frame uicontrol in MATLAB. How can this be done using MATLAB 7.0 (R14)?
採用された回答
MathWorks Support Team
2009 年 6 月 27 日
It is not possible to draw a plot on top of a frame uicontrol in MATLAB. However, it is possible to place axes objects on top of UIPANEL objects (which were introduced in MATLAB 7.0 (R14)).
It is not possible to display an axes on top of a frame uicontrol because the uicontrols are placed over the figure window rather than within the figure window. Therefore, the frame uicontrol will always be drawn on top of the axes.
If you are using a version of MATLAB prior to 7.0, or if you want to use a frame uicontrol with MATLAB 7.0 instead of a uipanel, you may want to create a second axes and set its color so that it is similar to the frame color.
For example:
figure;
h_frame = uicontrol('style','frame');
frame_color = get(h_frame,'BackGroundColor');
delete(h_frame)
ax_frame = axes('color',frame_color,'ytick',[],'xtick',[]);
box on;
ax_plot = axes('position',[.2 .2 .5 .6])
plot(1:10)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!