5

I would like to draw an inclined ellipse in PStricks, but seems the angle command does not work here. How can I make my ellipse inclinde?

  \psellipse[linestyle=dashed,angle=-30,linecolor=red,dash=3pt 2pt](-2,3)(0.5,0.5)

2 Answers 2

7

You must use the rot option:

\documentclass[pstricks, border=12pt]{standalone}
\usepackage{pstricks}
\begin{document}
\begin{pspicture}[showgrid=true](-2,-3)(3,4)
\psellipse[linestyle=dashed, rot=-30,linecolor=red, dash=3pt 2pt](0.5,0.5)(1,3)
\end{pspicture}
\end{document}

This gives:

enter image description here

1
  • \usepackage{pstricks} can be removed because standalone with pstricks option loads the package automatically. Commented Sep 10, 2013 at 13:42
2

Using composite transformation just for refreshing elementary school math.

\documentclass[pstricks,border=12pt]{standalone}
\begin{document}
\begin{pspicture}[showgrid=true](-2,-3)(3,4)
\rput(0.5,0.5){\rput{-30}(0,0){\rput(-0.5,-0.5){\psellipse[linestyle=dashed,linecolor=red,dash=3pt 2pt](0.5,0.5)(1,3)}}}
\end{pspicture}
\end{document}

enter image description here

2
  • 1
    Or with pstricks-add you could also rotate with \psrotate(0.5,0.5){-30}{\psellipse(0.5,0.5)(1,3)}.
    – Christoph
    Commented Sep 10, 2013 at 14:22
  • Yours can be simplified as \rput{-30}(0.5,0.5){\psellipse[linestyle=dashed,linecolor=red,dash=3pt 2pt](1,3)} Commented Dec 11, 2017 at 0:19

You must log in to answer this question.

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