MathGroup Archive 2008

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

Search the Archive

Re: Print[Plot] vs Print[text,Plot]?

  • To: mathgroup at
  • Subject: [mg87945] Re: Print[Plot] vs Print[text,Plot]?
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Mon, 21 Apr 2008 03:23:47 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fueep7$bai$>

AES wrote:

> I've just executed a test cell containing
>    Print[Plot[---]];
>    Print["Some text\n", Plot[---]];
> (same simple plot in both lines; objective of 2nd line being to get the 
> text and the plot -- eventually several plots -- into the same output 
> cell)


Getting precise control of the size and position of graphics objects -- 
possibly mixed with text strings -- can be achieve thanks to commands 
such as Column, Row, GraphicsRow, GraphicsColumn, Inset, etc.

For instance, the above "example" can be written

     Column[{"Some text", Plot[Sin[x], {x, 0, 10}]}]

The output should be more of your liking. (Note that we have not use any 
of the available options.)

Print is of really use when one wants to display some information within 
a loop or block structure.

     Do[Print[Column[{"Some text", Plot[Sin[x], {x, 0, 10}]}]];
      Print["Some other text"], {3}]

-- Jean-Marc

  • Prev by Date: Re: Defining derivatives
  • Next by Date: Re: Very Long Wait for the Kernel after Reboot
  • Previous by thread: Re: Hamiltonian System with NDSolve
  • Next by thread: Re: Print[Plot] vs Print[text,Plot]?