Graphics, Figures & Tables ⇒ Inverse variation with PSTricks
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Inverse variation with PSTricks
If I were to plot, say y=5/x using postflix, how would I do that? I tried 5 x div, but I get a really funky graph. I am not smart enough to update my pstricks, so using algebraic in my plot does not work..
Any advice would help..
thank you
Nick
Any advice would help..
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
Inverse variation with PSTricks
Don't you have an idea of how such graph would look like? If not, take for good measure a program like Gnuplot and plot this function. I see no problem with the sample below.
If this solves your problem, please mark the topic as solved by editing your initial post and choosing the green checkmark from the icon list.
Best regards
Thorsten
Code: Select all
\documentclass{minimal}
\usepackage{pstricks-add}
\begin{document}
\begin{psgraph}(0,0)(5,5){5cm}{!} % x-y-axis with same unit
\psplot{1}{5}{5 x div}
\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: Inverse variation with PSTricks
Thorsten,
Thank you again, I did that code, but must not have paid attention to the domain. Did not mean to waste your time, but thank you again!
Thank you again, I did that code, but must not have paid attention to the domain. Did not mean to waste your time, but thank you again!
-
- Posts: 351
- Joined: Sat Aug 02, 2008 8:47 am
Inverse variation with PSTricks
better:localghost wrote:Code: Select all
\documentclass{minimal} \usepackage{pstricks-add} \begin{document} \begin{psgraph}(0,0)(5,5){5cm}{!} % x-y-axis with same unit \psplot{1}{5}{5 x div} \end{psgraph} \end{document}
Code: Select all
\documentclass{minimal}
\usepackage{pstricks-add}
\begin{document}
\begin{psgraph}{->}(0,0)(5,5){5cm}{!}
\psplot[yMaxValue=5,algebraic]{0.01}{5}{ 5/x }
\end{psgraph}
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Inverse variation with PSTricks
Yes, and of course I'm aware. But as the OP already mentioned, his package version at least doesn't support the algebraic option and an update is not possible at the moment. That's the reason why he has to use the postfix notation (see also related topics). And it is not sure that the yMaxValue option is alredy supported in that version.CrazyHorse wrote:better:HerbertCode: Select all
\documentclass{minimal} \usepackage{pstricks-add} \begin{document} \begin{psgraph}{->}(0,0)(5,5){5cm}{!} \psplot[yMaxValue=5,algebraic]{0.01}{5}{ 5/x } \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
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Inverse variation with PSTricks
Thank you both for the help, I will hopefully figure out how to update my pstricks. I think I was lucky to even get it on my computer and working. I want to plot 5/x in both the I and III Quadrants on the coordinate plane, but when I do so, I get the asymptote line, is there anyway I can get rid of it?
Also, I could not show anything but the first quadrant using the psgraph feature, so I had to adjust the code.
Thanks Nick
Also, I could not show anything but the first quadrant using the psgraph feature, so I had to adjust the code.
Thanks Nick
Code: Select all
\documentclass{minimal}
\usepackage{pstricks-add}
\begin{document}
\psaxes{<->}(0,0)(5,5)(-5,-5)
\psplot{-3}{8}{5 x div}
\end{document}
-
- Posts: 351
- Joined: Sat Aug 02, 2008 8:47 am
Inverse variation with PSTricks
plot two curves, one for the 1st and one for the 3rd quadrantcoachbennett1981 wrote:I will hopefully figure out how to update my pstricks. I think I was lucky to even get it on my computer and working. I want to plot 5/x in both the I and III Quadrants on the coordinate plane, but when I do so, I get the asymptote line, is there anyway I can get rid of it?
Also, I could not show anything but the first quadrant using the psgraph feature, so I had to adjust the code.
or update PSTricks, then you can do it with one:
Code: Select all
\listfiles
\documentclass{minimal}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\psaxes{<->}(0,0)(5,5)(-5,-5)
\psplot[yMaxValue=5]{-5}{5}{5 x div}
\end{pspicture}
\end{document}
your log file say?
Herbert
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Re: Inverse variation with PSTricks
Herbert, I use TexShop and am currently updated to the newest version. I looked at the log list of One page, but I am not sure what I am looking for. I go to the log list, and I have several options:
~/library/logs
/library/logs
/private/var/log
Section 8.2 Recip
I can see the PDF statistics. I am sorry to be so much trouble, but I don't understand what I am looking for..
I feel like a new computer user on the phone trying to figure out a problem that seems so obvious.
Nick
~/library/logs
/library/logs
/private/var/log
Section 8.2 Recip
I can see the PDF statistics. I am sorry to be so much trouble, but I don't understand what I am looking for..
I feel like a new computer user on the phone trying to figure out a problem that seems so obvious.
Nick
-
- Posts: 351
- Joined: Sat Aug 02, 2008 8:47 am
Inverse variation with PSTricks
TeXShop is a gui and not the system like MacTeX or TeXLive.coachbennett1981 wrote:Herbert, I use TexShop and am currently updated to the newest version. I looked at the log list of One page, but I am not sure what I am looking for. I go to the log list, and I have several options:
~/library/logs
/library/logs
/private/var/log
Section 8.2 Recip
I can see the PDF statistics. I am sorry to be so much trouble, but I don't understand what I am looking for..
I feel like a new computer user on the phone trying to figure out a problem that seems so obvious.
After every latex or pdflatex run there exists a logfile
with the main file name and extension .log.
Herbert