Text rotieren
Verfasst: Do 1. Dez 2022, 17:35
Guten Tag zusammen,
in folgendem Minimalbeispiel:
möchte ich die oberen beiden Texte rotieren, damit sie besser lesbar sind. Die Grafik ist angelehnt an https://texample.net/tikz/examples/circular-arrows-text/. Im verwandten Beispiel https://texample.net/tikz/examples/pdca-cycle/ sind die oberen beiden Texte rotiert, aber dort wird nicht mit einer foreach-Schleife gearbeitet. Geht's auch mit Schleife?
Beste Grüße
Helmut
in folgendem Minimalbeispiel:
\documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{decorations.text,backgrounds} \newcommand*{\mytextstyle}{\sffamily\large\bfseries\color{black!85}} \tikzstyle{zentr}=[shape=circle,draw=none,text=black,font=\Large\bfseries,minimum size=3cm] \newcommand{\arcarrow}[8]{% % inner radius, middle radius, outer radius, start angle, % end angle, tip protusion angle, options, text \pgfmathsetmacro{\rin}{#1} \pgfmathsetmacro{\rmid}{#2} \pgfmathsetmacro{\rout}{#3} \pgfmathsetmacro{\astart}{#4} \pgfmathsetmacro{\aend}{#5} \pgfmathsetmacro{\atip}{#6} \fill[#7] (\astart:\rin) arc (\astart:\aend:\rin) -- (\aend+\atip:\rmid) -- (\aend:\rout) arc (\aend:\astart:\rout) -- (\astart+\atip:\rmid) -- cycle; \path[ font = \sffamily, decoration = { text along path, text = {|\mytextstyle|#8}, text align = {align = center}, raise = -0.5ex}, decorate] (\astart+\atip:\rmid) arc (\astart+\atip:\aend+\atip:\rmid); } \begin{document} \begin{tikzpicture} \node[zentr, align=center,fill=red!50] (Kreis) {Kreis}; \fill[even odd rule,red!30] circle (3. circle (3.2); \foreach \x\j in { 0/Text falsch rum, 90/Text falsch rum, 180/Text richtig rum, 270/Text richtig rum} {\arcarrow{3}{3.5}{4}{\x+20}{\x+100}{5}{red!50, draw = red!50!black, very thick}{\j}; } \end{tikzpicture} \end{document}
Beste Grüße
Helmut