Re: Defining the labels to display in ContourLabels

*To*: mathgroup at smc.vnet.net*Subject*: [mg121460] Re: Defining the labels to display in ContourLabels*From*: dreamcatcher <sasmathematica at gmail.com>*Date*: Fri, 16 Sep 2011 05:46:32 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <j4se59$snb$1@smc.vnet.net>

On Sep 15, 4:48=C2 pm, Luiz Melo <lm... at ufsj.edu.br> wrote: > Hi there. Assuming: > > ContourPlot[Cos[x*y]/Exp[x^2 + y^2], {x, -2, 2}, {y, -2, 2}, ContourLabels > -> All, Contours -> 9] > > I would like to keep the number of contours (9) and to label only those of > values 0.9, 0.7, 0.5, 0.3, 0.1 > > How? > > Thank you. > > -- > Prof. *Luiz Guilherme C. > Melo*<https://sites.google.com/site/luizguilhermecmelo/home> > Telecommunication engineering > Universidade Federal Sao Joao del-Rei > Campus Alto Paraopeba > Rodovia MG 443, Km 7 > Ouro Branco - MG > 36420-000 - Brazil ContourPlot[Cos[x*y]/Exp[x^2 + y^2], {x, -2, 2}, {y, -2, 2}, ContourLabels -> (Text[ If[FreeQ[{0.2, 0.4, 0.6, 0.8}, #3], #3], {#1, #2}] &), Contours -> 9] It's weird that below doesn't work in my computer=EF=BC=9A ContourPlot[Cos[x*y]/Exp[x^2 + y^2], {x, -2, 2}, {y, -2, 2}, ContourLabels -> (Text[ If[MemberQ[{0.1, 0.3, 0.5, 0.7, 0.9}, #3], #3], {#1, #2}] &), Contours -> 9] Even ContourPlot[Cos[x*y]/Exp[x^2 + y^2], {x, -2, 2}, {y, -2, 2}, ContourLabels -> (Text[ If[MemberQ[{0.1, 0.3, 0.5, 0.7, 0.9}, #3], #3], {#1, #2}] &), Contours -> Table[0.1 i, {i, 1, 9}]] doesn't work either. Are you ok with this?