Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4984

Re: Defining the labels to display in ContourLabels

From dreamcatcher <sasmathematica@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Defining the labels to display in ContourLabels
Date 2011-09-16 09:48 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j4v61l$c3t$1@smc.vnet.net> (permalink)
References <j4se59$snb$1@smc.vnet.net>

Show all headers | View raw


On Sep 15, 4:48=C2 pm, Luiz Melo <lm...@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?

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Defining the labels to display in ContourLabels Luiz Melo <lmelo@ufsj.edu.br> - 2011-09-15 08:48 +0000
  Re: Defining the labels to display in ContourLabels dreamcatcher <sasmathematica@gmail.com> - 2011-09-16 09:48 +0000

csiph-web