MathGroup Archive 2012

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

Search the Archive

Re: Logarithmic Color Scale in a ListContourPlot


data = Table[{
    x = RandomReal[{-2, 2}],
    y = RandomReal[{-2, 2}],
    10^(x + 3 y/2)},
   {1000}];

Module[{
  min = Log[10, Min[data[[All, 3]]]],
  max = Log[10, Max[data[[All, 3]]]]},
 ListContourPlot[data,
  PlotLegends -> Automatic,
  Contours -> (Table[{2, 5, 10}*10^n,
      {n, -1, 2}] // Flatten),
  ColorFunction -> Function[{f},
    ColorData["TemperatureMap"][(Log[10, f] - min)/(max - min)]],
  ColorFunctionScaling -> False]]


Bob Hanlon


On Thu, Dec 20, 2012 at 3:28 AM,  <raulfluis at gmail.com> wrote:
> Dear All,
>
> Is it possible to use a logarithmic scale in the colour legend of a ListContourPlot?
>
> Thank you very much in advance for any help you can provide.
>
> Best regards,
> Raul
>



  • Prev by Date: Re: Using a notebook as a notebook.
  • Next by Date: Re: Terrible unit trouble in Mathematic 9
  • Previous by thread: Logarithmic Color Scale in a ListContourPlot
  • Next by thread: Re: Logarithmic Color Scale in a ListContourPlot