![如何旋转用森林绘制的树形图中的标签?](https://linux22.com/image/402555/%E5%A6%82%E4%BD%95%E6%97%8B%E8%BD%AC%E7%94%A8%E6%A3%AE%E6%9E%97%E7%BB%98%E5%88%B6%E7%9A%84%E6%A0%91%E5%BD%A2%E5%9B%BE%E4%B8%AD%E7%9A%84%E6%A0%87%E7%AD%BE%EF%BC%9F.png)
我正在绘制一个巨大的树形图,我想把它放在一页纸上(目前它不适合放在 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}
您还可以改变生长方向而不使用景观。