MathGroup Archive 2009

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

Search the Archive

Re: Capturing the output(s) from a Manipulate?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103439] Re: Capturing the output(s) from a Manipulate?
  • From: Yves Klett <yves.klett at googlemail.com>
  • Date: Mon, 21 Sep 2009 07:09:19 -0400 (EDT)
  • References: <200909190927.FAA22363@smc.vnet.net> <h94vo4$nkl$1@smc.vnet.net> <h97i8s$4ga$1@smc.vnet.net>

Hi,

if you had read the suggested thread it might have inspired you to try
the following:

Manipulate[g = Plot[Sin[x (1 + a x)], {x, 0, 6}], {a, 0, 2},
 Button["Output", CellPrint[ExpressionCell[g, "Input"]]]]

which outputs - guess what - the raw output (other than "Paste Snapshot"
which returns the whole expression used to generate it). You could also
use the "Output" Style for CellPrint which will not evaluate but is
grouped in the same cell as the Manipulate (while "Input" generates new
ones).


Regards,
Yves


AES schrieb:
> AES wrote:
> 
>>> Suppose I have a Manipulate[ ] that creates one or more plots, tables, 
>>> whatever other output.  I exercise it though various values of the 
>>> controls until I understand how these outputs change, and then decide 
>>> that I want to capture and "freeze" into the notebook the outputs for 
>>> three specific sets of these control values,  call them cv1, cv2, cv3. 
> 
> and Murray Eisenberg <murray at math.umass.edu> wrote:
> 
>> It's already there!
>>
>> 1. Choose the settings you want for all the Manipulate output's controls.
>>
>> 2. On the Manipulate output, click the little + symbol that's in the 
>> upper-right corner of the panel.  A drop-down menu appears. Click the 
>> entry Paste Snapshot.
>>
>> That will paste into a new Input cell a DynamicModule expression for the 
>> current settings of all the controls.  
> 
> Thanks -- I'm beginning to get a grasp of what Bookmarks and the like do.
> 
> But suppose I want to paste a permanent "snapshot", NOT of the Input 
> that creates this snapshot (which is positioned in an Input cell that I 
> then have to execute, and maybe erase), but rather a snapshot of the 
> finished _output_ (the Plot or Table or whatever) that the Manipulate 
> command has already created?
> 
> This seems to me a natural thing to want to do in many circumstances.  
> One might even want to do it three times, say, to create three "frozen" 
> snapshots of three typical outputs -- and then delete (or at least 
> disable) the whole associated Manipulate apparatus that created these 
> three examples, since it will no longer be needed.
> 
> Is there a good way (besides Copy and Paste) to make a snapshot of the 
> _Output_ from a Manipulate (without any added controls or similar 
> clutter)?
> 
> Questions beyond that:
> 
> 1)  Suppose I create a graphic Output cell either by executing a 
> Manipulate or even just by a simple Plot or Show or whatever command.
> 
> How can one best capture and "freeze" the rendered _Output cell 
> contents_ in this situation, so that they become a permanent 
> illustration or graphic in the notebook?  What style or other option 
> should one choose or edit within the Output cell, or a Copy and Pasted 
> version of the Output cell, to do this?
> 
> 2)  Suppose one creates several such outputs using a Manipulate command, 
> and then wants to remove or disable the Manipulate command itself ***and 
> all its associated side effects*** (since it will presumably no longer 
> be needed).
> 
> I suppose one answer is to delete the Manipulate cell; Save and Close 
> the notebook; Quit Mathematica; then re-open Mathematica and then the 
> notebook.  Is there a more efficient way?
> 
> Or will just unclicking Evaluatable for the Manipulate cell and 
> re-executing the notebook once be enough?
> 
> 3)  Re the Manipulate command:  It appears that the square inverted plus 
> icon in the Manipulate output window (i.e., white plus sign on square 
> gray background) is a toggle, while the circular inverted plus sign is 
> what's called a "contextual menu" (at least in Mac parlance, where the 
> associated icon is more often a small gear wheel).
> 
> Are these now more widely used (and standardized) conventions in 
> Mathematica?  (or elsewhere).  Is there somewhere one can read about 
> these icon conventions, or get a list of them?
> 


  • Prev by Date: Re: Generating best-fit line formula
  • Next by Date: Piecewise Constant Interpolation
  • Previous by thread: Re: Re: Capturing the output(s) from a Manipulate?
  • Next by thread: Re: Capturing the output(s) from a Manipulate?