Contour plot with color scale

  • Follow


Hello,
I want to make a contour plot witht the color scale with the appropiate min 
and max on the side,????
bests,
Eric 


0
Reply Eric 1/19/2010 10:15:20 AM

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@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@cox.net>
To: "Eric Gonzalez" <cire.glez@gmail.com>; <mathgroup@smc.vnet.net>
Sent: Tuesday, January 19, 2010 5:01 AM
Subject: Re:  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@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


0
Reply Bob 1/20/2010 11:50:10 AM


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@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 


0
Reply Bob 1/20/2010 11:51:06 AM

2 Replies
743 Views

(page loaded in 0.46 seconds)

Similiar Articles:













7/20/2012 10:01:25 PM


Reply: