필터 지우기
필터 지우기

handles an axes in gui

조회 수: 1 (최근 30일)
Prashant Funde
Prashant Funde 2016년 6월 13일
답변: Walter Roberson 2016년 6월 13일
Hello all;
I am using two axis in my gui, in which in one axis i have to plot bar graph and in another i am using plotfunction. I have to use use both axis under same Push button,
When i press push button it update axes2 with plot first and then bar graph is overlapped on that plot.
so please tell me how can i see both on different axes.
Here is my code under push button:
x=0;y=0;r=3;r1=0.2;
Az = 0.2;
El = 0.5;
x_c=Az;
y_c =El;
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
x1unit = r1 * cos(th) + x_c;
y1unit = r1 * sin(th) + y_c;
p=0;
y = -5:pi/100:5;
plot(p,y,y,p,xunit,yunit,x1unit,y1unit)
axis([-5 5 -5 5])
get1 = 0;
fill1 = 500;
get2 = 0;
fill2 = 200;
get3 = 0;
fill3 = 200;
get4 = 0;
fill4 = 200;
y = [get1 fill1; get2 fill2;get3 fill3;get4 fill4];
bar(y,'stacked');
i want to plot above fields in different axes; but currently both are displayed on second axes only .
Please provide me solution as soon as possible

답변 (1개)

Walter Roberson
Walter Roberson 2016년 6월 13일

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by