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

MathGroup Archive 2008

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

Search the Archive

Re: Plotting ListDensityPlot with Custom Color Scheme

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92552] Re: Plotting ListDensityPlot with Custom Color Scheme
  • From: michael.p.croucher at googlemail.com
  • Date: Sat, 4 Oct 2008 06:18:10 -0400 (EDT)
  • References: <gadcm5$rl2$1@smc.vnet.net> <gag2ql$3ee$1@smc.vnet.net>

Hi All,

There is an update to the package that Szabolcs mentioned - you can
find it here:

http://www.walkingrandomly.com/?p=116

On Sep 13, 10:57 am, Szabolcs Horv=E1t <szhor... at gmail.com> wrote:
> Buz Barstow wrote:
> > Dear All,
>
> > I'm trying to plot out a color map of a matrix with a custom color  
> > scheme, and add a legend to it.
>
> > The maximum value in the matrix is approximately 1.7, and the lowest =
 
> > value is -2.7. Most of the values lie in the range -0.5 to +0.5.
>
> > When Mathematica 6.0 produces a ListDensityPlot of this matrix, it  
> > color codes most of the plot, but it leaves large areas with  
> > "overflow" colors - some of the plot is displayed as white, not on the =
 
> > color map.
>
> > I'd like to be able to rescale the color function so that it spans the =
 
> > range -2.7 to 1.7, and produce a legend for the plot that accurately =
 
> > reflects this.
>
> MatrixPlot or ArrayPlot may be more suitable for this than
> ListDensityPlot (try them).



> With ListDensityPlot, use the option PlotRange -> All, or PlotRange ->
> {-2.7, 1.7} to set the range of values to be included in the plot.
>
> The ColorFunction and ColorFunctionScaling options may also be useful.
>
> The legend can be added with the Plot Legends package,
>
> http://reference.wolfram.com/mathematica/PlotLegends/tutorial/PlotLeg...
>
> Unfortunately that package can be a little problematic to use sometimes,
> so you may want to try this alternative:
>
> http://www.walkingrandomly.com/?p=24



  • Prev by Date: Re: How do I create my own color gradient?
  • Next by Date: Re: Re: RE: Comparison between Mathematica and other
  • Previous by thread: Re: mathlink unsigned types and bit sizes
  • Next by thread: Re: Re: RE: Comparison between Mathematica and other