RE: Plots with Variable Limits?

*To*: mathgroup at smc.vnet.net*Subject*: [mg24141] RE: [mg24100] Plots with Variable Limits?*From*: "David Park" <djmp at earthlink.net>*Date*: Wed, 28 Jun 2000 02:11:56 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

A.E., Changing plot parameters and reevaluating is a common operation. I find a convenient method is to use a compound statement where the plot parameters are defined first. So I would do your case like this: f[x_, a_] := a x^2 a0 = 4; Plot[f[x, a0], {x, -2a0, 2a0}]; Then, just change the a0 value and reevaluate. This is also a way to implement zooming. a0 = 4; x0 = 1; delta = 0.5; Plot[f[x, a0], {x, x0 - delta, x0 + delta}]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ > -----Original Message----- > From: A. E. Siegman [mailto:siegman at stanford.edu] To: mathgroup at smc.vnet.net > > I want to make a test plot of a function f[x,a] versus x for some > trial value of the parameter a without fixing that parameter for > subsequent cells, e.g. something like > > Plot[ f[r,a], {x,-2a,2a} ] /. a->10 > > If I try this, Mathematica gives me a "Plot::plln" error -- but then > goes ahead and makes the correct plot anyway. > > I can of course turn off the error -- but what's a better, but still > clean and simple, way to accomplish this. > > Thanks siegman at stanford.edu > >