Re: setting X and Y range in 2D plots
- To: mathgroup at smc.vnet.net
- Subject: [mg15364] Re: [mg15308] setting X and Y range in 2D plots
- From: "Jorge Zickermann" <jzickermann at mail.EUnet.pt>
- Date: Sat, 9 Jan 1999 23:58:21 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Drazen, As far as I know, the following applies to any type of plot of a 2D function. Lets say you have a function defined... y[x_]:=x^2 You can plot the result for a defined range of x using the automatic setup of axes by Mathematica. graphic = Plot[y[x],{x,-10,10}] Then, at any time, you can show the defined plot for a PlotRange (window) of your will... Show[graphic,PlotRange->{{-5,5},{0,10}}] where the ranges of x and y, to be seen, are defined. If you copy the inputs above into a notebook, and evaluate them, you will see that the definition of graphic gives a plot, which I suppose you don't want to see. Unlike with common input cells for which a following semicollon (;) hides the result, with Plot that doesn't happen. If you only want to see a particular window at all times, then you have to contract the inputs into the following form... graphic = Plot[y[x],{x,-10,10},PlotRange->{{-5,5},{0,10}}] Notice that if you ask for a PlotRange wider than that obtained for the variation of x, you won't get a complete plot. ie; If in the PlotRange above you wanted to see a window {{-5,12},{0,10}} you would have to make x vary up to 12, {x,-10,12}. Jorge ---------- >From: "Drazen Petrek" <zobel at fly.cc.fer.hr> To: mathgroup at smc.vnet.net >To: mathgroup at smc.vnet.net >Subject: [mg15364] [mg15308] setting X and Y range in 2D plots >Date: Fri, Jan 8, 1999, 9:15 am > >hi, >I have i simple question: How to set X and Y range in various 2D plots >(ImplicitPlot, ParametricPlot,Plot...)? Lets say i want to see a >particular "window" of graph. >