Effacer les filtres
Effacer les filtres

handles an axes in gui

1 vue (au cours des 30 derniers jours)
Prashant Funde
Prashant Funde le 13 Juin 2016
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

Réponses (1)

Walter Roberson
Walter Roberson le 13 Juin 2016

Catégories

En savoir plus sur Printing and Saving dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by