Graphics, Figures & Tables ⇒ Plot e^x with PSTricks
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Plot e^x with PSTricks
I am trying to plot this function and have looked at several PStricks modules but have had no luck graphing e^x. I can do ln(x) just fine..
Anyone have suggestions?
Thank you
Nick
Anyone have suggestions?
Thank you
Nick
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Plot e^x with PSTricks
Code: Select all
\documentclass{minimal}
\usepackage{pstricks-add}
\newcommand*{\PSTeuler}{2.7182818}
\begin{document}
\begin{psgraph}(0,0)(-5,0)(5,8){10cm}{!} % x-y-axis with same unit
\psplot[algebraic=true,linecolor=red]{-5}{2}{\PSTeuler^x}
\end{psgraph}
\end{document}
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Re: Plot e^x with PSTricks
How do you know so much??? Thank you so much!
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Re: Plot e^x with PSTricks
When I use your code, I get the following error.. I have been told I need to update my PStricks, but I don't know how.. I am simply not that advanced..
Undefined controls sequence
<argument>..psplot \ifPst@algebraic (\PSTeuler^x) \ifx \psk@PlotDerivative...
Undefined controls sequence
<argument>..psplot \ifPst@algebraic (\PSTeuler^x) \ifx \psk@PlotDerivative...
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Plot e^x with PSTricks
Reading the related manuals helps a lot. The rest is practical application (although I switched to pgf/tikZ).coachbennett1981 wrote:How do you know so much? […]
You just need an update [1]. That's it.coachbennett1981 wrote:[…] I have been told I need to update my PStricks, but I don't know how. […]
[1] MiKTeX 2.8 Manual - Installing Updates
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Re: Plot e^x with PSTricks
I use TexShop.. So I don't think that will be the same for me.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Plot e^x with PSTricks
So you will have to do that manually according to the TeX Directory Structure (TDS) standard. I'm not familiar with the LaTeX system on a Mac. But there should be TeX Live 2009 available for your machine.
It seems that your version doesn't accept the algebraic option. For the present you can try to plot the function using a postfix expression.
It seems that your version doesn't accept the algebraic option. For the present you can try to plot the function using a postfix expression.
Code: Select all
\documentclass{minimal}
\usepackage{pstricks-add}
\begin{document}
\begin{psgraph}(0,0)(-5,0)(5,8){10cm}{!} % x-y-axis with same unit
\psplot[linecolor=red]{-5}{2}{2.7182818 x exp}
\end{psgraph}
\end{document}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10