gui plotting on axes
1 view (last 30 days)
Show older comments
Im trying to attach a plot to an axes in a gui. Ive tried the following with no luck
function axes1_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
ax = handles.axes1;
l=15;
x=0:0.01:l*cosd(20);
y=tand(20)*x;
plot(x,y,'b')
x=100:-0.01:70-l*cosd(theta);
y=-tand(20)*x+tand(20)*70;
hold on;
plot(ax,x,y,'g')
ylim([0 15])
Ive also tried
axes(handles.axes1)
l=15;
x=0:0.01:l*cosd(20);
y=tand(20)*x;
plot(x,y,'b')
x=100:-0.01:70-l*cosd(theta);
y=-tand(20)*x+tand(20)*70;
hold on;
plot(x,y,'g')
ylim([0 15])
1 Comment
Answers (0)
See Also
Categories
Find more on Axis Labels 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!