MathGroup Archive 2008

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

Search the Archive

Re: A set of several questions

  • To: mathgroup at
  • Subject: [mg90141] Re: A set of several questions
  • From: "M.Roellig" <markus.roellig at>
  • Date: Mon, 30 Jun 2008 04:54:39 -0400 (EDT)
  • References: <g451va$pq7$>

> 2. When I use the ContourPlot, I am not able add Text outside of the
> plot area by doing Show[plot, text]. The text simply doesn't show up.

Show[plot,text] requires text to be a Graphics object. For example:

graph2 = ContourPlot[Sin[x]/Cos[y], {x, -1, 5}, {y, -3, 2},
   Frame -> True, Axes -> False];
txt = Graphics[Text["Example text", Scaled[{0.5, 0.5}]]]
Show[graph2, txt]

Here Show overlays both graphics, taking the PlotRange informatzion
from the
first one in the list. I used Scaled coordinates to place the text
relative to the Plot
If you want to place the text next to the Plot you have to use
Grid,GraphicsGrid or

GraphicsRow[{graph2, txt}]

Check the Inset Documentation for a nice example how to use Inset and
to create a custom Plot legend.

Hope that helped


  • Prev by Date: Re: How to stop execution within a cell?
  • Previous by thread: Re: A set of several questions
  • Next by thread: Re: documentation specification for Documentation Center-iteration