如何旋转用森林绘制的树形图中的标签?

如何旋转用森林绘制的树形图中的标签?

我正在绘制一个巨大的树形图,我想把它放在一页纸上(目前它不适合放在 A1 页面上)。一个简单的方法是旋转标签。我知道这个问题已经在这里得到解答了:在 TikZ 中旋转文本,但我还是不知道该怎么做!

这是我的代码:

\documentclass[12pt]{article}
\usepackage{forest}
\usepackage{lscape}
\usepackage[a1paper, margin=1mm]{geometry}






\begin{document}

\begin{landscape}
\begin{forest}  
[Omissive Bridging Principles
                         [Attitudinal
                                     [Beliefs
                                             [Wide
                                                  [Ought
                                                        [Positive]
                                                        [Negative]]
                                                  [Reason to
                                                             [Positive]
                                                             [Negative]]
                                                  [Permitted to
                                                               [Positive]
                                                               [Negative]]]
                                             [Narrow
                                                    [Ought
                                                          [Positive]
                                                          [Negative]]
                                                    [Reason to
                                                              [Positive]
                                                              [Negative]]
                                                    [Permitted to
                                                                 [Positive]
                                                                 [Negative]]]
                                             [Doubly Embedded
                                                             [Ought
                                                                   [Positive]
                                                                   [Negative]]
                                                             [Reason to
                                                                   [Positive]
                                                                   [Negative]]
                                                             [Permitted to
                                                                   [Positive]
                                                                   [Negative]]]]
                                     [Credences
                                               [Wide
                                                    [Ought
                                                          [Positive]
                                                          [Negative]]
                                                    [Reason to
                                                              [Positive]
                                                              [Negative]]
                                                    [Permitted to
                                                                 [Positive]
                                                                 [Negative]]]
                                               [Narrow
                                                      [Ought
                                                            [Positive]
                                                            [Negative]]
                                                      [Reason to
                                                                [Positive]
                                                                [Negative]]
                                                      [Permitted to
                                                                   [Positive]
                                                                   [Negative]]]
                                               [Doubly Embedded
                                                               [Ought
                                                                     [Positive]
                                                                     [Negative]]
                                                               [Reason to
                                                                         [Positive]
                                                                         [Negative]]
                                                               [Permitted to
                                                                            [Positive]
                                                                            [Negative]]]]]
                         [Attitudinal
                         [Beliefs
                         [Wide
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]
                         [Narrow
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]
                         [Doubly Embedded
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]]
                         [Credences
                         [Wide
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]
                         [Narrow
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]
                         [Doubly Embedded
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]]]]                                                       
\end{forest}
\end{landscape}








\end{document}

抱歉,代码的后半部分与前半部分相同,但布局很糟糕。我想旋转几乎所有标签,使它们水平放置(目前它们是垂直的,因为页面是横向的)。

非常感谢你的帮助!

答案1

只需添加for tree={rotate=-90}

\documentclass[12pt]{article}
\usepackage{forest}
\usepackage{lscape}
\usepackage[a1paper, margin=1mm]{geometry}
\begin{document}
\begin{landscape}
\begin{forest}  
for tree={rotate=-90}
[Omissive Bridging Principles
                         [Attitudinal
                                     [Beliefs
                                             [Wide
                                                  [Ought
                                                        [Positive]
                                                        [Negative]]
                                                  [Reason to
                                                             [Positive]
                                                             [Negative]]
                                                  [Permitted to
                                                               [Positive]
                                                               [Negative]]]
                                             [Narrow
                                                    [Ought
                                                          [Positive]
                                                          [Negative]]
                                                    [Reason to
                                                              [Positive]
                                                              [Negative]]
                                                    [Permitted to
                                                                 [Positive]
                                                                 [Negative]]]
                                             [Doubly Embedded
                                                             [Ought
                                                                   [Positive]
                                                                   [Negative]]
                                                             [Reason to
                                                                   [Positive]
                                                                   [Negative]]
                                                             [Permitted to
                                                                   [Positive]
                                                                   [Negative]]]]
                                     [Credences
                                               [Wide
                                                    [Ought
                                                          [Positive]
                                                          [Negative]]
                                                    [Reason to
                                                              [Positive]
                                                              [Negative]]
                                                    [Permitted to
                                                                 [Positive]
                                                                 [Negative]]]
                                               [Narrow
                                                      [Ought
                                                            [Positive]
                                                            [Negative]]
                                                      [Reason to
                                                                [Positive]
                                                                [Negative]]
                                                      [Permitted to
                                                                   [Positive]
                                                                   [Negative]]]
                                               [Doubly Embedded
                                                               [Ought
                                                                     [Positive]
                                                                     [Negative]]
                                                               [Reason to
                                                                         [Positive]
                                                                         [Negative]]
                                                               [Permitted to
                                                                            [Positive]
                                                                            [Negative]]]]]
                         [Attitudinal
                         [Beliefs
                         [Wide
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]
                         [Narrow
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]
                         [Doubly Embedded
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]]
                         [Credences
                         [Wide
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]
                         [Narrow
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]
                         [Doubly Embedded
                         [Ought
                         [Positive]
                         [Negative]]
                         [Reason to
                         [Positive]
                         [Negative]]
                         [Permitted to
                         [Positive]
                         [Negative]]]]]]                                                       
\end{forest}
\end{landscape}
\end{document}

您还可以改变生长方向而不使用景观。

相关内容