Exporting the image as TeX code

PSTricks, PGF/TikZ, and Asymptote.
Image
%\documentclass[10pt]{article} \documentclass[dvipdfmx{jsarticle} \usepackage{pgf,tikz} \usepackage{mathrsfs} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} \definecolor{ffqqqq}{rgb}{1.,0.,0.} \definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1.} \definecolor{qqqqff}{rgb}{0.,0.,1.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm] \draw[->,color=black] (-5.62,0.) -- (6.08,0.); \foreach \x in {-5.,-4.,-3.,-2.,-1.,1.,2.,3.,4.,5.,6.} \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$}; \draw[->,color=black] (0.,-0.66) -- (0.,7.6); \foreach \y in {,1.,2.,3.,4.,5.,6.,7.} \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$}; \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$}; \clip(-5.62,-0.66) rectangle (6.08,7.6); \draw[line width=2.8pt,color=qqqqff,smooth,samples=100,domain=-5.619999999999998:6.079999999999996] plot(\x,{(\x)^(3.0)-9.0/2.0*(\x)^(2.0)+6.0*(\x)}); \draw (-5.34,5.82) node[anchor=north west] {$f(x)=x^{3} - \frac{9}{2} \; x^{2} + 6 \; x$}; \draw [line width=2.pt,color=ffqqqq,domain=-5.62:6.08] plot(\x,{(--1.519--1.17*\x)/1.}); \begin{scriptsize} \draw[color=qqqqff] (0.4,1.18) node {$f$}; \draw [fill=xdxdff] (0.7,2.338) circle (1.5pt); \draw[color=xdxdff] (0.32,2.68) node {$A$}; \draw[color=ffqqqq] (4.76,7.4) node {$l$}; \end{scriptsize} \end{tikzpicture}
\end{document}