MathGroup Archive 2011

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

Search the Archive

Re: I want a plot label that shows interactively the values of a

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120867] Re: I want a plot label that shows interactively the values of a
  • From: Heike Gramberg <heike.gramberg at gmail.com>
  • Date: Sun, 14 Aug 2011 08:11:16 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201108131047.GAA25467@smc.vnet.net>

Mathematica interprets the expression "p2=" p2 as a multiplication. To 
get what you want you could use
Row[{"p2=", p2}] instead.

Heike.

On 13 Aug 2011, at 12:47, Massimiliano LANDI wrote:

> Hello everyone
>
> I am trying to add to a plot I created a text that shows the value of 
a variable, call it p2, that can be changed via Manipulate.
>
> So I did:
>
> Manipulate[
> Plot[....,Epilog->{Text[Style["p2=" p2, 18,   If[(A/(1 + B n) <= 
p2 <= (A + A n)/(1 + n + B n) &&  k == 2) || (p2 == 1 && k ==
 1), Red, Black],   Background -> LightGray]}],
> ...]
>
> The funny thing is that with this code, in the text label, the actual 
value of the variable appears before the text p2.
>
> For example, when I set p2=10, the label in the graph becomes
>
> 10 p2
>
> whereas I would like to see
>
> p2 = 10
>
> Any help?
>
> Thanks in advance
>
> Massimiliano Landi





  • Prev by Date: Re: more efficient method of importing and plotting large (> 100mb) files.
  • Next by Date: Re: Just another Mathematica "Gotcha"
  • Previous by thread: I want a plot label that shows interactively the values of a
  • Next by thread: Re: I want a plot label that shows interactively the values of a