Graphics, Figures & TablesCoordinate Plane Range

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

Coordinate Plane Range

Post by coachbennett1981 »

I have a question about the following code:

Code: Select all

\pspicture(-5,5)(5,5)
	\psaxes[linecolor=gray]{<->}(0,0)(-4,-5)(5,5)
	\psplot[plotstyle=curve,linewidth=2pt,arrows=<->,linecolor=red]{-3.5}{-1}{4 x x mul mul 18 x mul add 17 add}
	\endpspicture
	\vspace{1in}
I want to change the scale so I can fit this graph into beamer presentation, I wanted to have the range be from -4 to -1. The output at x=-4 is 9. How can I change the graph so the axis will go that high and not take up so much room on the page? I have changed Dy=2, but that just spaces out the values for y. Any suggestions?

Nick

Recommended reading 2024:

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

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

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Coordinate Plane Range

Post by CrazyHorse »

coachbennett1981 wrote:I have a question about the following code:
I want to change the scale so I can fit this graph into beamer presentation, I wanted to have the range be from -4 to -1. The output at x=-4 is 9. How can I change the graph so the axis will go that high and not take up so much room on the page? I have changed Dy=2, but that just spaces out the values for y. Any suggestions?
next time provide _full_ working examples, not only code fragments ...

Code: Select all

\documentclass{beamer}
\usepackage{pst-plot}
\begin{document}

\begin{frame}{Title}{subtitle}
\begin{center}
\resizebox{0.7\linewidth}{!}{%
\pspicture(-5,-5)(5,5)
 \psaxes[linecolor=gray]{<->}(0,0)(-4,-5)(5,5)
 \psplot[plotstyle=curve,linewidth=2pt,arrows=<->,
  linecolor=red]{-3.5}{-1}{4 x x mul mul 18 x mul add 17 add}
\endpspicture}
\end{center}
\end{frame}

\end{document}
Herbert
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Re: Coordinate Plane Range

Post by coachbennett1981 »

I see how you resized the figure, but I am wondering how to change the yaxis so that if I wanted to go out further (to 9) I can, I have changed the Dy=2, etc, but it does not work..
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Coordinate Plane Range

Post by CrazyHorse »

coachbennett1981 wrote:I see how you resized the figure, but I am wondering how to change the yaxis so that if I wanted to go out further (to 9) I can, I have changed the Dy=2, etc, but it does not work..

Code: Select all

while (true) {
_complete_ example
}
Herbert
Post Reply