how to merge twovgraphs

조회 수: 1 (최근 30일)
mallela ankamma rao
mallela ankamma rao 2022년 7월 5일
댓글: mallela ankamma rao 2022년 7월 6일
Good evening sir
i have two graphs with different x and y axes. i want to merge two graphs.i have tried alot but i could not fix it.so please help me anyone how to merge two graphs. the graphs are below
I request you sir please help me anyone .Thank you

채택된 답변

Rohit Kulkarni
Rohit Kulkarni 2022년 7월 5일
편집: Rohit Kulkarni 2022년 7월 5일
You can check out this documentation for plotting both graphs together: Display Data with Multiple x-Axes and y-Axes.
  댓글 수: 3
Rohit Kulkarni
Rohit Kulkarni 2022년 7월 5일
편집: Rohit Kulkarni 2022년 7월 5일
As you have not provided the dataset or the function you used to plot the above graphs.
I have taken a random function here to get similar results,
x= 0:0.5:200;
y1 = x.^4; % both functions are same hence coinciding
y2 = x.^4;
plot(x,y1,"o-");
hold on
plot(x,y2);
hold off
set(gca,'xtick', 0:25:200);
xticklabels(["1/3/20" ,"25/3/20", "19/4/20",...
"14/5/20", "8/6/20","3/7/20", "28/7/20","15/8/20","5/9/20"])
mallela ankamma rao
mallela ankamma rao 2022년 7월 6일
Thanks alot for your help sir

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Kapil Kumar
Kapil Kumar 2022년 7월 5일
Did you tried using 'hold on' after plotting first graph?
If not,
write 'hold on' after plotting first graph and then after plotting second graph write 'hold off'
  댓글 수: 1
mallela ankamma rao
mallela ankamma rao 2022년 7월 5일
by combining these two graphs i need like below graph sir

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by