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.

TikZ allows regular polygons with specified number of sides for nodes. I'm using PGF though and want similar features and to be able to create my own custom shapes.

See percusse's answer for example code:

Tikz scale vs pgf scale



for the polygons.

What I would like is to be able to create a reference shape like rpoly7 that is simply a regular polygon with 7 sides that uses the TikZ shapes but can be passed to PGF like I do with the other shapes.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

The regular polygon shape is not a "TikZ shape" (and neither are any of the other predefined shapes), they're all "PGF shapes". General rule: If the relevant keys in the pgfmanual include the /pgf directory, they're PGF keys. To set the parameters like regular polygon sides, you have to call \pgfkeys{/pgf/<option>=<value}:


\pgfkeys{/pgf/regular polygon sides=6,/pgf/minimum size=0.75cm}
\pgfnode{regular polygon}{center}{}{}{}
\pgfkeys{/pgf/regular polygon sides=3}
\pgfnode{regular polygon}{center}{}{}{}
share|improve this answer

Your Answer


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.