我想拍摄一张PGF图片,缩小它(缩放文本,使\resizebox
完美)以获得一定的高度,然后在图片的左侧放置一个旋转的文字并创建包含所有内容的节点。
这样的事情:
但我希望能够设置图表的高度而不缩小旋转的“标题”。
以下是此示例的LaTeX代码:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,fit,shapes.geometric,backgrounds}
\begin{document}
\begin{tikzpicture}[%
inner sep=2mm,
delimiter/.style={ellipse, very thick, fill=red!30, draw=red!50},
action/.style={trapezium, trapezium left angle=120, trapezium right angle=60, thick, fill=blue!30, draw=blue!50, align=center},
loop/.style={ellipse, thick, fill=yellow!30, draw=yellow!50, align=center},
title/.style={font=\LARGE\scshape,node distance=16pt, text=black!40, inner sep=1mm},
background/.style={rectangle, rounded corners, fill=black!5, draw=black!15, inner sep=4mm}
]
\node[delimiter] (begin) {Begin};
\node[action] (cluster residues) [below=of begin] {Cluster residues};
\node[action] (set clusters) [below=of cluster residues] {Set properties\\for every cluster};
\node[action] (find pockets) [below=of set clusters] {Find clusters with\\$normalized\ SAS < 1$};
\node[action] (sort pockets) [below=of find pockets] {Sort pockets found};
\node[delimiter] (end) [below=of sort pockets] {End};
\draw[->] (begin.south) -- (cluster residues);
\draw[->] (cluster residues) -- (set clusters);
\draw[->] (set clusters) -- (find pockets);
\draw[->] (find pockets) -- (sort pockets);
\draw[->] (sort pockets) -- (end);
\node[fit=(begin)(cluster residues)(set clusters)(find pockets)(sort pockets)(end)] (chart) {};
\node[title] (title) [left=of chart] {\rotatebox{90}{General algorithm}};
\begin{scope}[on background layer]
\node[background,fit=(chart)(title)] {};
\end{scope}
\end{tikzpicture}
\end{document}
有关如何使用\resizebox
,\adjustbox
或其他任何内容调整仅图表(而不是“常规算法”标签)的任何想法?