[Tex/LaTex] Upside-down triangle as node shape

shapestikz-pgf

How to give a node the shape of an upside-down triangle (base at top)?

I tried the following:

triangle/.style = { regular polygon, regular polygon sides=3, rotate=180}

But I don't want the text rotated.

Best Answer

The solution is to use shape border rotate instead of rotate:

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture} [
    triangle/.style = {fill=blue!20, regular polygon, regular polygon sides=3 },
    node rotated/.style = {rotate=180},
    border rotated/.style = {shape border rotate=180}
  ]
    \node[triangle, node rotated] (a) {Bad triangle};
    \node[triangle, border rotated, right=6cm of a] {Good triangle};
\end{tikzpicture}
\end{document}
Related Question