필터 지우기
필터 지우기

How to flip a Matlab tree plot upside down?

조회 수: 1 (최근 30일)
Jonathan
Jonathan 2018년 10월 28일
편집: Jonathan 2018년 11월 1일
The documentation for treeplot describes an example where a unique root node located at the top of the graph is parent to several "layers" of nodes in a descending order.
I'd like to somehow flip this graph about the horizontal axis so that the root node ends up at the base of the now reversed tree. Then I'd like to add labels to the nodes.
Any idea to get me started?

채택된 답변

madhan ravi
madhan ravi 2018년 10월 28일
yticklabels([1:10]) %an example
set ( gca, 'ydir', 'reverse' )
  댓글 수: 2
Jonathan
Jonathan 2018년 11월 1일
Thank you, that did exactly what I needed. I particularly appreciate that the labels I added to the treeplot before flipping it stayed attached to the right nodes and were not flipped themselves. I had anticipated more complication in that regard!
madhan ravi
madhan ravi 2018년 11월 1일
Anytime buddy :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

태그

제품


릴리스

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by