Graphics, Figures & TablesReciprocal Functions y=a/x-h with PSTricks

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Reciprocal Functions y=a/x-h with PSTricks

Post by coachbennett1981 »

I am trying to plot y=(1/[x-2])+3 using postfix. I tried this code:

Code: Select all

\documentclass{minimal}
\usepackage{pstricks-add}


\begin{document}

\begin{center}
\pspicture(-3,-3)(3,3.5)
\psaxes{<->}(0,0)(5,5)(-5,-5)
    \psplot[arrows=<->,linewidth=2pt,linecolor=red]{1}{5}{4 x 1 sub div}
    \psplot[arrows=<->,linewidth=2pt,linecolor=red]{-5}{-1}{ 4 x 1 sub div}
\endpspicture
\end{center}   
  
\end{document}
My code fails to work. I tried RPN to see if that worked, but it does not. Any suggestions.

Nick
Last edited by coachbennett1981 on Fri Apr 09, 2010 12:50 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Re: Reciprocal Functions y=a/x-h with PSTricks

Post by coachbennett1981 »

I GOT IT!!!!!!!!!!!!!!!!!!!

Yes!!!!!!!!! Don't reply!!!!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Reciprocal Functions y=a/x-h with PSTricks

Post by localghost »

Nice that you have found a solution. But others may also be interested in that. So, it would be very kind if you can post it here.

However, your request is very confusing. You intend to plot y=[1/(x-2)]+3, but in your code example you inserted the postfix notation for y=4/(x-1).

In case you have solution (found wherever or however), please mark the topic as solved by editing your initial post and choosing the green checkmark from th icon list.


Best regards
Thorsten
Post Reply