MathGroup Archive 2009

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

Search the Archive

Writing a graphic to a notebook

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104650] Writing a graphic to a notebook
  • From: Gerry Flanagan <flanagan at materials-sciences.com>
  • Date: Fri, 6 Nov 2009 05:14:02 -0500 (EST)

How do you send a graphic to a notebook under program control? For 
example, taking the documentation example
CellPrint[Cell[BoxData[ToBoxes[Plot[Sin[x], {x, -2, 2}]]], "Output"]]
and changing to
NotebookWrite[nb, Cell[BoxData[ToBoxes[Plot[Sin[x], {x, -2, 2}]]], 
"Output"]]
gives an error message (nb is a previously created notebook object).

I think I've seen this somewhere, and remember it was pretty obscure. 
Surprising that anything to works inside CellPrint would not work inside 
NotebookWrite.
Gerry F.


  • Prev by Date: Mysterious Output in formatted Notebook
  • Next by Date: Re: How can I change the default path for the function "Put"?
  • Previous by thread: Re: Mysterious Output in formatted Notebook
  • Next by thread: Re: Writing a graphic to a notebook