Problem with drawing the plot
    2 views (last 30 days)
  
       Show older comments
    
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 Comments
Answers (0)
See Also
Categories
				Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!