Re: Does anything replace Recall[] ?
- To: mathgroup at smc.vnet.net
- Subject: [mg24405] Re: Does anything replace Recall[] ?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 18 Jul 2000 00:58:05 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <8kjc83$dol@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
there is also in version 3.0 no Recall[] command.
But $InString[$Line] will help you.
And
SetOptions[Plot, PlotLabel :> InString[$Line]]
will give you an nice boxed expression like
"\\(Plot[\\(\\(Sin[x]\\), \\({x, 0, 1}\\)\\)]\\)"
You may remove the \( \) by
SetOptions[Plot,
PlotLabel :> (StringReplace[InString[$Line], {"\\(" -> "", "\\)" ->
""}])]
and get the labeled result.
Hope that helps
Jens
rob wrote:
>
> In "Mathematica, A Practical Approach" (p. 146) the author tells how
> to label a plot with the line that generates it. Running the
> following line before a plot:
>
> SetOptions[{Plot, ListPlot}, PlotLabel :> ToString[Recall[$Line]]];
>
> apparently used to work. Now (ver 4.0), I get "Recall[the line
> number]" instead of the line itself. The Help shows no evidence of
> Recall[] so I assume the command has been dropped.
>
> This would be neat to use -- anyone know of a replacement for this
> functionality?
>
> Thanks, Rob