将 tikz 树的颜色更改为蓝色

将 tikz 树的颜色更改为蓝色
\begin{center}

\begin{tikzpicture}[   level 1/.style={sibling distance=40mm},   edge from parent/.style={->,draw},
  >=latex]
\node[root] {Compresseur}   child {node[level 2] (c2) {Compresseur rotatif}}   child {node[level 2] (c3) {Compresseur alternatif}};

\begin{scope}[every node/.style={level 3}]
\node [below of = c2, xshift=15pt] (c21) {Centrifuge}; \node [below of
= c21] (c22) {Axial}; \node [below of = c22] (c23) {A palettes}; \node [below of = c23] (c24) {A vis}; \node [below of = c24] (c25) {Scroll}; \node [below of = c24] (c25) {A lobes};
\node [below of = c3, xshift=15pt] (c31) {A piston}; \node [below of = c31] (c32) {Hydrolique};
\end{scope}

\foreach \value in {1,...,5}   \draw[->] (c2.195) |- (c2\value.west);
\foreach \value in {1,2}   \draw[->] (c3.195) |- (c3\value.west); \end{tikzpicture}
\end{center}

在此处输入图片描述

答案1

这不是一个完整的答案,因为问题不太清楚,更不用说可编译了。你想把什么变成蓝色?如果是线条,看看

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees,shadows}
\begin{document}
\begin{center}

\begin{tikzpicture}[root/.style={rounded corners,draw,fill=green!50},
level 1/.style={sibling distance=40mm},  
level 2/.style={sibling distance=40mm,rounded corners,draw,fill=green!80}, 
level 3/.style={sibling distance=40mm,draw,fill=red!30},   
 edge from parent/.style={->,draw,blue},
  >=latex,every node/.append style={drop shadow},font=\sffamily]

\node[root] {Compresseur}   child {node[level 2] (c2) 
{Compresseur rotatif}}   
child {node[level 2] (c3) {Compresseur alternatif}};

\begin{scope}[every node/.append style={level 3}]
\node [below of = c2, xshift=15pt] (c21) {Centrifuge}; 
\node [below of = c21] (c22) {Axial}; 
\node [below of = c22] (c23) {A palettes}; 
\node [below of = c23] (c24) {A vis}; 
\node [below of = c24] (c25) {Scroll}; 
\node [below of = c25] (c26) {A lobes};

\node [below of = c3, xshift=15pt] (c31) {A piston}; 
\node [below of = c31] (c32) {Hydrolique};
\end{scope}

\foreach \value in {1,...,6}   
{\draw[blue,->] (c2.195) |- (c2\value.west);}

\foreach \value in {1,2}   
{\draw[blue,->] (c3.195) |- (c3\value.west);}
\end{tikzpicture}
\end{center}
\end{document}

在此处输入图片描述

请注意,我必须猜测节点的样式,因为它们不是代码的一部分。

相关内容