答案1
来自pstricks-add.tex
http://archiv.dante.de/~herbert/TeXnik/tex/generic/pstricks-add/
\documentclass[margin=3mm,pstricks]{standalone}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-3,-1)(4,5.5)
\psaxes[labels=none,ticks=none]{->}(0,0)(-2.5,-1)(3.5,5)[$x$,-90][$y$,0]
\psyTick(1){1}\uput[225](0,0){0}
\psplot[algebraic,yMaxValue=4.5,linecolor=red,linewidth=1.5pt]{-2.5}{3}{Euler^(-(x))}
\psCallout(1,0.6){\scriptsize $f(x)=e^{-x}$}
\end{pspicture}
\end{document}
\documentclass[margin=3mm,pstricks]{standalone}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-3,-1)(4,5.5)
\psaxes[labels=none,ticks=none]{->}(0,0)(-2.5,-1)(3.5,5)[$x$,-90][$y$,0]
\psyTick(1){1}\uput[225](0,0){0}
\psplot[algebraic,yMaxValue=4.5,linecolor=red,linewidth=1.5pt]{-2.5}{3}{Euler^(-(x))}
\psCallout(1,0.6){\scriptsize $f(x)=e^{-x}$}
\psCallout[tipAngle=120,tipPos=0.6,linearc=0.5,
fillcolor=blue!30,fillstyle=solid](-1,0.2){\shortstack{negative\\axis}}
\end{pspicture}
\end{document}
答案2
一个简单的 Ti钾Z 解决方案仅用于比较目的:
\documentclass[margin=3mm,tikz]{standalone}
\usetikzlibrary{shapes,calc}
\begin{document}
\begin{tikzpicture}
\draw[->] (0,-1)--(0,3) node[left] {$y$};
\draw[->] (-3,0)--(3,0) node[below]{$x$};
\draw[fill=black] (0,1) circle (0.5pt) node[below left]{1};
\draw (0,0) node[below left] {$O$};
\draw plot[smooth,domain=-1:2.5] (\x,{exp(-(\x))});
\node (root) at (1+0.1,1/e+0.1) {};
\node[
rectangle callout,
draw,
yshift=1cm,
xshift=2cm,
callout absolute pointer={(root)}
] {\scriptsize $f(x)=e^{-x}$};
\end{tikzpicture}
\end{document}