MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plotting piecewise in 2D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109750] Re: Plotting piecewise in 2D
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Fri, 14 May 2010 19:57:55 -0400 (EDT)

Hi,

because at the end all comes to the point that your function is sampled
at different places and single dicontinuous points are a problem

DensityPlot[
   Piecewise[{{1000, x == 0 && y == 0}}, 0], {x, -1, 1}, {y, -1, 1}, 
   PlotPoints -> 3, Mesh -> All, MaxRecursion -> #, 
   ColorFunction -> "LightTemperatureMap"] & /@ Range[1, 10]

Such stuff will not work reliable. Try to sample it by yourself and see
what happens

ArrayPlot[
   Table[If[x == 0 && y == 0, 1000, 0], {y, -1, 1, 2/#}, {x, -1, 1, 
     2/#}]] & /@ Range[50, 55]

Cheers
Patrick

On Fri, 2010-05-14 at 05:32 -0400, Jim Lambaugh wrote:
> Hi
> 
> Please take a look at
> 
> DensityPlot[If[x == 0 && y == 0, 1000, 0], {x, -1, 1}, {y, -1, 1}]
> 
> This just gives me a uniform plot. Why does the peak at (0,0) not show
> up?
> 
> Best,
> Jimmy.
> 



  • Prev by Date: Re: Plotting piecewise in 2D
  • Next by Date: Re: How to write reports and books in Mathematica
  • Previous by thread: Re: Plotting piecewise in 2D
  • Next by thread: Re: Plotting piecewise in 2D