rotation of graph node labels

18 次查看(过去 30 天)
I am plotting some graphs using circular layout, for example
plot(digraph([1 2 3],[2 3 1]),"layout","circle");axis equal
The node labels come out rotated. I can't find a property to set in order to make them stand up straight.

采纳的回答

Christine Tobler
Christine Tobler 2020-7-6
The labels will be straight in most layouts (all but 'circle', 'layered'). You can first use 'circle' layout and then convert to having no layout and instead setting x, y data explicitly:
p = plot(G, 'Layout', 'circle');
p.XData = XData;
This will make the labels stand straight.
  1 个评论
Roy Goodman
Roy Goodman 2020-7-7
Thanks. I find this to be more useful than the first answer. An accessible text rotation property would be more useful. This works but it messes up the label positions which were fine.

请先登录,再进行评论。

更多回答(1 个)

Sugar Daddy
Sugar Daddy 2020-7-4

类别

Help CenterFile Exchange 中查找有关 Graph and Network Algorithms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by