As from figure we can see that the gragh are in down direction. Now my question is that there any way that we can fix our Y-axis and the direction of gragh should be above?

 채택된 답변

Raj
Raj 2019년 8월 13일
편집: Raj 2019년 8월 13일

0 개 추천

So I understand you want your Y axis to be in reverse direction (decreasing from bottom to top) so that your graph comes out in 'upward' direction. In that case use this after your plot command:
set(gca, 'YDir','reverse')

댓글 수: 4

Farooq Aamir
Farooq Aamir 2019년 8월 13일
@Raj thanks for your response one thing more if I don't want the scale of Y dimension just reverse the graph?
Raj
Raj 2019년 8월 13일
Use this after you reverse the graph:
set(gca,'YTick', [])
Farooq Aamir
Farooq Aamir 2019년 8월 13일
@ Raj thanks again but I want only the graph direction change but the scale of Y axes should be the same by this cammand Y axis scales diapsappear.
Raj
Raj 2019년 8월 13일
When you said "I don't want the scale of Y dimension", I assumed you wanted to make it disappear. Sorry but I am not sure what exactly you are looking for. How can you reverse the graph while maintaining the same Y axis scale (i.e. normal increasing order)? The graph is just a visual representation of your data. So to achieve what you are looking for, you may have to go back to your data source and do some adjustments there to alter the data itself.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2019년 8월 13일

댓글:

Raj
2019년 8월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by