Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Adding Legend to a ListDensityPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91899] Adding Legend to a ListDensityPlot
  • From: Buz Barstow <buzb at mac.com>
  • Date: Fri, 12 Sep 2008 05:27:21 -0400 (EDT)

Dear All,

As a follow up to my previous question, I'd like to add a legend to a  
ListDensityPlot in Mathematica 6.0.

I've able to do this with ShowLegend, using this command

Show[
  ShowLegend[
   ListDensityPlot[
    distanceDifferenceData, PerformanceGoal -> "Normal", Mesh ->  
Automatic,
    LabelStyle -> {FontFamily -> "Helvetica", FontSize -> 10},
    ColorFunction -> "ThermometerColors", DataRange -> {{-2, 230},  
{-2, 230}},
    ColorFunctionScaling -> True,
    FrameLabel -> {Style["Residue Number", FontWeight -> Bold],
      Style["Residue Number", FontWeight -> Bold]}
    ],
   {ColorData["ThermometerColors"][1 - #1] &, 25, ">0.4", "<-0.6",
    LegendBorder -> {Black}, LegendPosition -> {1.1, -0.4},
    LegendTextSpace -> 5, LegendBorderSpace -> 3, LegendShadow -> {0.,  
0.}}
   ],
  ImageSize -> {400, Automatic}]


However, I'd really like to display the text in the legend in  
Helvetica, as in the rest of the plot. I've tried:

{ColorData["ThermometerColors"][1 - #1] &, 25, Style[">0.4",FontFamily- 
 >"Helvetica"],
    Style["<-0.6",FontFamily->"Helvetica"],
    LegendBorder -> {Black}, LegendPosition -> {1.1, -0.4},
    LegendTextSpace -> 5, LegendBorderSpace -> 3, LegendShadow -> {0.,  
0.}}

but each time I try this, Mathematica gives an error. Is there a way  
around this, or should I edit the text in an external program like  
Illustrator?

Thanks! and all the best,

--Buz




  • Prev by Date: Re: ListContourPlot3D, no output
  • Next by Date: Re: Alternating sums of large numbers
  • Previous by thread: Re: Plotting ListDensityPlot with Custom Color Scheme
  • Next by thread: Re: Real and Complex Roots presented in a single plot