Clear Filters
Clear Filters

handles an axes in gui

1 view (last 30 days)
Prashant Funde
Prashant Funde on 13 Jun 2016
Answered: Walter Roberson on 13 Jun 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

Answers (1)

Walter Roberson
Walter Roberson on 13 Jun 2016

Categories

Find more on Printing and Saving 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!