Re: ContourPlot Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg83099] Re: ContourPlot Problem
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sun, 11 Nov 2007 02:54:06 -0500 (EST)
- Organization: The Open University, Milton Keynes, UK
- References: <fh3qip$l1$1@smc.vnet.net>
Kevin J. McCann wrote:
> I am having a problem with the following code and that is that not all
> of the contours are plotted.
>
> \[Beta]=.
> x=.
> z=.
> V[\[Beta]_,x_,z_]:=1/Sqrt[x^2+z^2]1/Sqrt[1-\[Beta]^2x^2/(x^2+z^2)]
> cntrs=Table[c,{c,0.05,5,0.05}];
> L=6;
>
>
> ContourPlot[V[0.9,x,z],{x,-L,L},{z,-L,L},Contours->cntrs,FrameLabel->{"x","z"}]
>
>
>
> In fact if I set the contours to lie between 4 and 5, say, then no
> contours are plotted. Che pasa?
Assuming I have correctly understood you, what you want is a hundred
equally-spaced contour lines to be displayed. The following expression
will do that:
ContourPlot[V[0.9, x, z], {x, -L, L}, {z, -L, L}, Contours -> 100,
FrameLabel -> {"x", "z"}]
Regards,
--
Jean-Marc