Problem with drawing the plot

조회 수: 13 (최근 30일)
Ivan Khomich
Ivan Khomich 2020년 9월 10일
편집: Ivan Khomich 2020년 9월 10일
Hello everyone!
I have a problem with drawing a plot on an axes. For example I have code like this:
function DrawSmth
FigurePos=[60 80 1820 890];
figure('Units', 'pixels', 'Position', FigurePos,'Color', 'w', 'Tag', 'Fig', 'MenuBar', 'none');
AxesPos=[650 90 300 400];
axes(gcf, 'Units', 'pixels', 'Position', AxesPos, 'Tag', 'Graphic','Color', [1 0 0]);
x=0:0.01:2;
y=sin(x);
plot(gca,x,y);
zoom on
On a picture you can see what I get when run the code.
I get this even when I try the examples in MatlabDocumentation like this:
figure
tab1 = uitab('Title','Tab1');
ax1 = axes(tab1);
plot(ax1,1:10)
tab2 = uitab('Title','Tab2');
ax2 = axes(tab2);
surf(ax2,peaks)
If anyone can help,I'l appreciate this.
Update.
It does'nt show even this:
x=0:0.001:2*pi;
y=sin(x);
plot(x,y)
Still the empty figure window.

답변 (0개)

카테고리

Help CenterFile 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!

Translated by