       Using colored text in PlotLabel

• To: mathgroup at smc.vnet.net
• Subject: [mg120669] Using colored text in PlotLabel
• From: Andrew DeYoung <adeyoung at andrew.cmu.edu>
• Date: Wed, 3 Aug 2011 07:06:18 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

```Hi,

I often use Mathematica 7 to display data, using ListPlot.  Since I
end up creating plots containing lots of colored lines, it would be
helpful if I could color the text that I display above my plots using
PlotLabel.  Do you know if there is a way to do this without having to
resort to the Plot Legends Package, which I sometimes find somewhat
cumbersome to use (because I often end up having to spend a lot of
time positioning the legend so that it does not cover my plot lines)?

If you have time, I have plotted an example plot of mine here:

In that plot, I have created the title using PlotLabel.  Specifically,
I used the following Mathematica commands:

ListPlot[
{{energies1eq[], fp*energies1eq[]}\[Transpose], {20 +
energies1md[], fp*energies1md[]}\[Transpose],
{energies2eq[], fp*energies2eq[]}\[Transpose], {20 +
energies2md[], fp*energies2md[]}\[Transpose],
{energies3eq[], fp*energies3eq[]}\[Transpose], {20 +
energies3md[], fp*energies3md[]}\[Transpose]},
PlotRange->All,Joined->True,AxesLabel->{"t (ps)","(kcal/
mol)"},PlotLabel->"Total Energy\nRed: Velocity-Verlet\nGreen: Leapfrog
\nBlue: Accurate Velocity-Verlet\n",PlotStyle-
>{Pink,Red,Green,Darker[Green],Cyan,Blue},ImageSize->imgSize]

Do you know how to make my title that says, for example, "Red: ",
actually red?

Thank you very much for your time!

Andrew DeYoung
Carnegie Mellon University

```

• Prev by Date: Re: OpenCLQ failing
• Next by Date: Re: Memory leak or flawed garbage collector
• Previous by thread: Re: Poincare section for double pendulum
• Next by thread: Re: Using colored text in PlotLabel