Re: Logarithmic Color Scale in a ListContourPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg129219] Re: Logarithmic Color Scale in a ListContourPlot
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Fri, 21 Dec 2012 05:43:21 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <20121220082819.289B268E6@smc.vnet.net>
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
>
- References:
- Logarithmic Color Scale in a ListContourPlot
- From: raulfluis@gmail.com
- Logarithmic Color Scale in a ListContourPlot