MathGroup Archive 2007

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

Search the Archive

Re: Plot, Epilog, and Text

  • To: mathgroup at
  • Subject: [mg80859] Re: Plot, Epilog, and Text
  • From: Szabolcs <szhorvat at>
  • Date: Tue, 4 Sep 2007 03:48:53 -0400 (EDT)
  • Organization: University of Bergen
  • References: <> <fbgn89$9qe$>

bsyehuda at wrote:
> 3. define g as g[X_String,w_?NumberQ,f_]:=...

I have seen people use NumberQ before in situations like this, so I 
would like to point out that the more reliable solution is to use 
NumericQ.  For example, NumberQ[Sqrt[2]] is False, NumberQ[Pi] is False, 

The necessity to use _?NumericQ usually comes up when passing a function 
to NIntegrate (or other similar function).  NIntegrate evaluates its 
argument with plain numbers, so using NumberQ will not lead to problems, 
but the function provided by the OP seems more likely to be evaluated 
(by the user) with numeric quantities that are not "Number"s.


  • Prev by Date: using units and plotting
  • Next by Date: reducing the size of a Manipulate slider control, problem when using ImageSize
  • Previous by thread: Re: Plot, Epilog, and Text
  • Next by thread: Re: Plot, Epilog, and Text