MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plots with Variable Limits?

  • To: mathgroup at
  • Subject: [mg24112] Re: Plots with Variable Limits?
  • From: Jens-Peer Kuska <kuska at>
  • Date: Wed, 28 Jun 2000 02:11:37 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8j9djn$>
  • Sender: owner-wri-mathgroup at


Plot[] has the hold all attribute. And

Plot[ f[r,a], {x,-2a,2a} ]  /.  a->10

will evaluate 

Plot[ f[r,a], {x,-2a,2a} ] 

ans see that it can't draw the it because a is unknown.
Than it replaces a with 10 and can draw it, so the plot 
is gernerated. You must preven the first evaluation with

ReleaseHold @ (Hold[Plot[f[r, a], Evaluate[{r, -2a, 2a}]]] /. a -> 10)

and all works fine.


"A. E. Siegman" wrote:
> 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

  • Prev by Date: Re: Plots with Variable Limits?
  • Next by Date: Re: Piecewise functions definition and usage
  • Previous by thread: Re: Plots with Variable Limits?
  • Next by thread: Conditionals with multiple tests?