4
\begin{tikzpicture}[scale=0.8]

 \begin{axis}[
    trig format plots=rad,
    axis equal, axis x line=middle, axis y line=
     middle, xlabel={$x$}, ylabel={$y$},xmin=-3,xmax=3,ymin=-4,ymax=4] 

 \addplot [domain=-2:2, samples=590, red,very thick]({(3*x)/(1+x^3)},{(3*x^2)/(1+x^3)}); 

\end{axis} 

\end{tikzpicture}

enter image description here

See above my code for the Folium of Descartes. My question is, how do I make it look like the folium. I tried to increase the samples, but after I put 600, I get an error (dimension too large)

1
  • You are using slope to parametrize the curve. This is not ideal and in particular, the curve abruptly stops at slope = ±2. Would you care to switch to using polar coordinate?
    – Symbol 1
    Sep 20 at 21:23
5

If you want to stick to slope, you have to be careful with domains.

Descartes folimu

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{pgfplots}
\begin{document}

\begin{tikzpicture}

\begin{axis}[
    trig format plots=rad,
    axis equal, axis x line=middle, axis y line=
     middle, xlabel={$x$}, ylabel={$y$},xmin=-3,xmax=3,ymin=-4,ymax=4] 

 \addplot [domain=-1:180, smooth,samples=2000, red,very thick]({(3*x)/(1+x^3)},{(3*x^2)/(1+x^3)}); 

 \addplot [domain=-180:-1, smooth,samples=2000, red,very thick]({(3*x)/(1+x^3)},{(3*x^2)/(1+x^3)}); 

\end{axis} 


\end{tikzpicture}

\end{document}

It would be better to plot it in polar coordinates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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