7

Possible Duplicate:
Easy curves in TikZ

I want to draw an equivalent of the following pstricks picture with tikz.

\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}
\psaxes[ticks=none,labels=none]{->}(0,0)(-2,-2)(2,2)
\pscurve(1,1)(1.4,0.5)(0.4,-0.2)(0.6,-0.2)(0.2,-1.4)
             (-0.5,-1.1)(-1,-1.6)(-1.4,0.4)
\end{pspicture}
\end{document} 

It is a simple curve which represents an area.

I couldn't find such a question which isn't imaginable

Marco Daniel
  • 95,681
  • I'm struggling to imagine a scenario for which such a drawing would be necessary. Also, it doesn't represent an area! Perhaps http://tex.stackexchange.com/questions/33607/easy-curves-in-tikz can be a good start though. – qubyte Dec 27 '11 at 11:40
  • @MarkS.Everitt: It's part of a picture. The curve represents the border of two areas. – Marco Daniel Dec 27 '11 at 11:42
  • And look at http://tex.stackexchange.com/questions/7548/can-we-imitate-the-behavior-of-pscurve-in-tikz – Alain Matthes Dec 27 '11 at 11:46
  • @Altermundus: Ah! That's a nice catch. Perhaps this question should be closed as a duplicate... – qubyte Dec 27 '11 at 11:51
  • I voted for closing this question as duplicated. – Marco Daniel Dec 27 '11 at 11:58
  • It seems that the exact behaviour is hard to duplicate, but since it's rather arbitrary this will only be an issue when trying to translate a picture using \pscurve. – qubyte Dec 27 '11 at 11:58
  • @percusse: The path shouldn't be closed. – Marco Daniel Dec 27 '11 at 11:58

1 Answers1

15

Not quite the same, but you may get close if you play around with the tension.

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
    \draw[->] (-2,0) -- (2,0);
    \draw[->] (0,-2) -- (0,2);
    \draw[thick] plot [smooth,tension=1.5] coordinates{(1,1) (1.4,0.5) (0.4,-0.2) (0.6,-0.2) (0.2,-1.4) (-0.5,-1.1) (-1,-1.6) (-1.4,0.4)};
\end{tikzpicture}
\end{document}

enter image description here

qubyte
  • 17,299
  • Can I somehow obtain the coordinates of the point at some arbitrary position on the resulting curve? – Dror Apr 11 '14 at 07:52