Is it possible to draw a plot in a frame uicontrol in MATLAB?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I would like to draw a plot in a frame uicontrol in MATLAB. How can this be done using MATLAB 7.0 (R14)?
Akzeptierte Antwort
MathWorks Support Team
am 27 Jun. 2009
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!