Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
3  
Try with shape border rotate option. –  Claudio Fiandrino Jun 4 at 9:32
    
Thanks, that worked! –  Tim N Jun 4 at 9:33
2  
why don't you answer showing your example before and after the correction? It will be nice and useful for others with the same problem. –  Claudio Fiandrino Jun 4 at 10:38
1  
@ClaudioFiandrino Done! –  Tim N Jun 4 at 11:17
    
@ Tim N: thanks :) –  Claudio Fiandrino Jun 4 at 12:05

1 Answer 1

up vote 7 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.