MathGroup Archive 2009

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

Search the Archive

Writing a graphic to a notebook


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