showing variables in plots?
- To: mathgroup at smc.vnet.net
- Subject: [mg70021] showing variables in plots?
- From: Sam Waller <sam.waller at avmet.com>
- Date: Sat, 30 Sep 2006 05:12:56 -0400 (EDT)
I'm plotting something like this:
x = 2;
curve = Plot[...., DisplayFunction -> Identity];
txt = Graphics[ Text["x = 2", {10, 10},....] ];
Show[curve, txt, DisplayFunctio->$DisplayFunction, ...];
The problem is that I want 'txt' to automatically change if I assign a different value to x so that
I don't have to edit txt everytime I change the variable x. Something like printf() in C. Can this
be done in mathematica?
thanks,
Sam