colours on phylogeny tree

조회 수: 9 (최근 30일)
Alireza
Alireza 2016년 3월 13일
편집: Luuk van Oosten 2016년 4월 6일
I wonder how can I color certain edges on a phylogeny tree. I can visualize my tree using phytreeviewer(mytree), but I couldn't figure out how to change color / width of edges.
Thanks,

답변 (1개)

Luuk van Oosten
Luuk van Oosten 2016년 3월 21일
편집: Luuk van Oosten 2016년 4월 6일
Dear Rostam,
I'll try to illustrate how to color with a small example. You could try (something like) the following:
yourtree = phytreeread('pf00002.tree')
This will generate a yourtree from one of MATLABs build-in trees. Now you want to handle the graphical elements of your tree:
h = plot(yourtree,'Type','square')
Inspect h in your workspace. This will give you a bit of a feeling how yourtree looks like.
Now you can set certain properties (such as color), for example by using:
set(h.BranchLines,'Color',[1 0 0])
This will set the color of your branch lines to red.
In a similar way, you can select other elements of yourtree and adjust its properties. I do not know what exactly you are trying to color, but I suggest you have a look at the following documentation pages as well:
Have fun!

카테고리

Help CenterFile Exchange에서 Directed Graphs에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by