I would like to draw a rectangle in perspective which looks like this

\draw (0,1) -- (0,3) -- (2,5) -- (2,3) -- cycle;

enter image description here

Is there an alternative way by declaring a rectangle

\tikzstyle{my_rectangle} = [rectangle, minimum width=2cm, minimum height=1cm]

and rotate it around the upward pointing axis? And if yes how would I do the rotation?

  • 1
    \tikzstyle is deprecated.
    – user156344
    Apr 23, 2019 at 12:42
  • While TikZ itself supports 3d coordinates, they are not in gerneral orthogonal or normal. For that you should use tikz-3dplot. Apr 23, 2019 at 13:56

1 Answer 1


Like this?

\tikzset{my_rectangle/.style={draw,rectangle, minimum width=2cm, minimum height=1cm}}
\node[my_rectangle,canvas is zy plane at x=0] {};

enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .