From: Iván Lazaro on 7 Apr 2010 03:20 Dear all, I'm trying to make visible in a ListContourPlot for a function, a maximum value for it. The thing is that the Max of this function is very specific (Log[2]) and I need that my readers can follow the "movement" of this maximum, although i want them to have the rest of the contour. Is this possible within the ListContourPlot function? Or should I make this curve apart and then "paste it" in the contour? Thanks in advance, and please excuse my terrible English. Iv=E1n.
From: dh on 7 Apr 2010 07:27 On 07.04.2010 09:20, Iv�n Lazaro wrote: > Dear all, > > I'm trying to make visible in a ListContourPlot for a function, a maximum > value for it. The thing is that the Max of this function is very specific > (Log[2]) and I need that my readers can follow the "movement" of this > maximum, although i want them to have the rest of the contour. Is this > possible within the ListContourPlot function? Or should I make this curve > apart and then "paste it" in the contour? > > > Thanks in advance, and please excuse my terrible English. > > Iv=E1n. > Hi Ivan, if you know where the maximum is, you may mark it in the epilog like e.g.: d = Flatten[Table[{x, y, Exp[-0.01 (x^2 + y^2)]}, {x, -10, 10}, {y,-10, 10}], 1]; ListContourPlot[d, Epilog -> {Red, Circle[{0, 0}, .1]}] If you do not know the location, draw a contour slightly below the max, like e.g.: d = Flatten[ Table[{x, y, Exp[-0.01 (x^2 + y^2)]}, {x, -10, 10}, {y, -10, 10}], 1]; ListContourPlot[d, Contours -> {0.5, 0.6, 0.7, 0.8, 0.9, 0.999}] cheers,Daniel -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh(a)metrohm.com> Internet:<http://www.metrohm.com>
From: Bob Hanlon on 8 Apr 2010 07:59 data == Table[{ x == RandomReal[{-2, 2}], y == RandomReal[{-2, 2}], Sin[x y]}, {1000}]; Show[ ListContourPlot[data], ContourPlot[x y ==== Pi/2, {x, -2, 2}, {y, -2, 2}, ContourStyle -> Directive[Red, Thick]]] Show[ ListContourPlot[data], ParametricPlot[{x, Pi/2/x}, {x, -2, 2}, PlotStyle -> Directive[Red, Thick], Exclusions -> 0]] Bob Hanlon ---- "Iv=C3=A1n Lazaro" <gaminster(a)gmail.com> wrote: ========================== Dear all, I'm trying to make visible in a ListContourPlot for a function, a maximum value for it. The thing is that the Max of this function is very specific (Log[2]) and I need that my readers can follow the "movement" of this maximum, although i want them to have the rest of the contour. Is this possible within the ListContourPlot function? Or should I make this curve apart and then "paste it" in the contour? Thanks in advance, and please excuse my terrible English. Iv==E1n.
From: Iván Lazaro on 8 Apr 2010 08:00 Thanks a lot Daniel; that last suggestion make the trick! Iv=E1n
From: Bob Hanlon on 9 Apr 2010 03:32 The extraneous equal signs got put in sometime after the e-mail left my mailbox. My sent copy is good and executes fine. data = Table[{ x = RandomReal[{-2, 2}], y = RandomReal[{-2, 2}], Sin[x y]}, {1000}]; Show[ListContourPlot[data], ContourPlot[x y == Pi/2, {x, -2, 2}, {y, -2, 2}, ContourStyle -> Directive[Red, Thick]]] Show[ListContourPlot[data], ParametricPlot[{x, Pi/2/x}, {x, -2, 2}, PlotStyle -> Directive[Red, Thick], Exclusions -> 0]] If correcting the set and equal signs didn't work, perhaps you used a version prior to 6. Directive was new in 6. Bob Hanlon ---- Virgil Stokes <vs(a)it.uu.se> wrote: ============= On 08-Apr-2010 13:59, Bob Hanlon wrote: > data == Table[{ > x == RandomReal[{-2, 2}], > y == RandomReal[{-2, 2}], > Sin[x y]}, {1000}]; > > Show[ > ListContourPlot[data], > ContourPlot[x y ==== Pi/2, > {x, -2, 2}, {y, -2, 2}, > ContourStyle -> Directive[Red, Thick]]] > > Show[ > ListContourPlot[data], > ParametricPlot[{x, Pi/2/x}, > {x, -2, 2}, > PlotStyle -> Directive[Red, Thick], > Exclusions -> 0]] > > > Bob Hanlon > > ---- "Iv=C3=A1n Lazaro"<gaminster(a)gmail.com> wrote: > > ========================== > Dear all, > > I'm trying to make visible in a ListContourPlot for a function, a maximum > value for it. The thing is that the Max of this function is very specific > (Log[2]) and I need that my readers can follow the "movement" of this > maximum, although i want them to have the rest of the contour. Is this > possible within the ListContourPlot function? Or should I make this curve > apart and then "paste it" in the contour? > > > Thanks in advance, and please excuse my terrible English. > > Iv==E1n. > > > > I copied and pasted this code into Mathematica 7 and many errors were generated when I tried to execute it. I then realized that there were some errors in the "=" signs. After fixing this (at least no errors appear), the two plots generated are incorrect --- first one is an empty frame [-1,-1] x [-1,-1] and second one is in the same size frame with only a broken vertical line in it. Would you please tell me how to fix this code. Thanks, --V. Stokes
|
Pages: 1 Prev: Simplifying multiple expressions Next: Pattern to match a list of non-negative integers |