MathGroup Archive 2010

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

Search the Archive

Re: Contour plot with color scale

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106663] Re: [mg106628] Contour plot with color scale
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 20 Jan 2010 06:50:23 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Needs["PlotLegends`"];

mydata = RandomReal[{0.6, 180.}, {10, 5}]

ShowLegend[
 MatrixPlot[mydata,
  AspectRatio -> 1,
  Mesh -> All,
  ColorFunction -> (ColorData[
       "TemperatureMap"][(#1 - 0.6)/(180 - 0.6)] &),
  ColorFunctionScaling -> False],
 {ColorData["TemperatureMap"][1 - #1] &,
  15, "180", "0.6",
  LegendPosition -> {1.1, -0.8},
  LegendSize -> {.25, 1.5},
  LegendShadow -> None}]


Bob Hanlon

---- Eric Gonzalez <cire.glez at gmail.com> wrote: 

=============
Thank you Bob,
I still have some problems. I am doing a MatrixPlot with values bewteen 0.6 
to 180.0 ( ColorFunction ->
   "TemperatureMap"], {ColorData["TemperatureMap"][#1] &, 10,
  ToString[Min[mydata]], ToString[Max[mydata]], )  the 0.6 points does not 
show blue in the plot so I dont think there is a correspodence between the 
legend color map and and the chart. Also how to set several points in the 
legend rather than the max and min?
thnk you for your help,
Eric

ShowLegend[
 MatrixPlot[mydata, AspectRatio -> 1, Mesh -> All,
  PlotRange -> All,
  ColorFunction ->
   "TemperatureMap"], {ColorData["TemperatureMap"][#1] &, 10,
  ToString[Min[mydata]], ToString[Max[mydata]],
  LegendPosition -> {1.1, -0.8}, LegendSize -> 1.5,
  LegendShadow -> None}]

----- Original Message ----- 
From: "Bob Hanlon" <hanlonr at cox.net>
To: "Eric Gonzalez" <cire.glez at gmail.com>; <mathgroup at smc.vnet.net>
Sent: Tuesday, January 19, 2010 5:01 AM
Subject: [mg106663] Re: [mg106628] Contour plot with color scale


>
> Needs["PlotLegends`"]
>
> ShowLegend[
> ContourPlot[
>  Cos[x] + Cos[y],
>  {x, 0, 4 Pi}, {y, 0, 4 Pi},
>  Contours -> 9],
> {ColorData["LakeColors"][1 - #1] &,
>  10, " 2", "-2",
>  LegendPosition -> {1.1, -0.4}}]
>
>
> Bob Hanlon
>
> ---- Eric Gonzalez <cire.glez at gmail.com> wrote:
>
> =============
> Hello,
> I want to make a contour plot witht the color scale with the appropiate 
> min
> and max on the side,????
> bests,
> Eric



  • Prev by Date: Re: Initialization problem in a DynamicModule
  • Next by Date: Re: Initialization problem in a DynamicModule
  • Previous by thread: Re: Contour plot with color scale
  • Next by thread: Replace list element based on a condition how to