Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

RE: Plots with Variable Limits?

  • To: mathgroup at
  • Subject: [mg24120] RE: [mg24100] Plots with Variable Limits?
  • From: Wolf Hartmut <hwolf at>
  • Date: Wed, 28 Jun 2000 02:11:42 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

> -----Original Message-----
> From:	A. E. Siegman [SMTP:siegman at]
To: mathgroup at
> Sent:	Tuesday, June 27, 2000 6:52 AM
> To:	mathgroup at
> Subject:	[mg24100] Plots with Variable Limits?
> 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
[Wolf Hartmut]  

You just need to wrap Plot with Unevaluated.

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

This prevents the evaluation of plot _before_ substitution occurs (which
doesn't work  and therefore generates the error message; after the error the
original input was returned which then was replaced and evaluated

Kind regards,  Hartmut

  • Prev by Date: Re: Plots with Variable Limits?
  • Next by Date: RE: Plots with Variable Limits?
  • Previous by thread: Re: Plots with Variable Limits?
  • Next by thread: RE: Plots with Variable Limits?