Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4401

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

From Massimiliano LANDI <landim@smu.edu.sg>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: I want a plot label that shows interactively the values of a
Date 2011-08-14 12:24 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j28epq$3g6$1@smc.vnet.net> (permalink)

Show all headers | View raw


Thanks a lot Heike.

Problem solved.

Massimiliano Landi
________________________________________
From: Heike Gramberg [heike.gramberg@gmail.com]
Sent: Saturday, August 13, 2011 7:09 PM
To: Massimiliano LANDI
Cc: mathgroup@smc.vnet.net
Subject: Re: I want a plot label that shows interactively the values of a

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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: I want a plot label that shows interactively the values of a Massimiliano LANDI <landim@smu.edu.sg> - 2011-08-14 12:24 +0000

csiph-web