Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: ListDensityPlot with irregular data and InterpolationOrder

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88584] Re: ListDensityPlot with irregular data and InterpolationOrder
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Fri, 9 May 2008 03:23:55 -0400 (EDT)
  • Organization: University of Bergen
  • References: <fvudo3$ec7$1@smc.vnet.net>

Bill Rowe wrote:
> On 5/7/08 at 7:10 AM, szhorvat at gmail.com (Szabolcs Horv=C3=A1t) wrote:
> 
>> This is not explicitly documented (or at least I could not find any
>> mention of it), but from looking at the plots it seems to me that
>> with ListDensityPlot (and related functions), an InterpolationOrder
>> higher than 1 only work with data that lies on a regular grid.
> 
>> So for example the following data cannot be plotted with
>> InterpolationOrder higher than 1:
> 
>> data = {#1, #2, Sin[#1] Sin[#2]} & @@@ RandomReal[2 Pi, {100, 2}];
> 
>> Is this correct?
> 
> The array you create above is a regular array and as far as I
> can see there is no problem with using an InterpolationOrder
> greater than 1. That is, using your code above to assign values
> to data
> 
> 
> ListDensityPlot[data]
> ListDensityPlot[data,InterpolationOrder->1]
> ListDensityPlot[data,InterpolationOrder->3]
> 
> all execute with no error messages.
> 
> True, all three graphics appear identical. But I believe this is
> due the functional relationship you created.
> 
> Do the following
> 
> data=RandomReal[2 Pi, {5,5}];
> 
> then
> 
> ListDensityPlot[data]
> ListDensityPlot[data,InterpolationOrder->1]
> ListDensityPlot[data,InterpolationOrder->3]
> 
> All three should execute with no error and the images will not
> be the same due to the different interpolation order.


Exactly this is what I mean, i.e. that when passing arbitrary data 
points to ListDensityPlot (instead of data on a regular grid), 
InterpolationOrder seems to only have an effect if we use 
InterpolationOrder -> 0.  Otherwise the result will be the same as with 
InterpolationOrder -> None.

So it seems that ListDensityPlot can only interpolate on a grid, but not 
in a more general situation.

This is not a problem, of course, but I got a bit confused because it 
gives no error message!


  • Prev by Date: Re: Formatting Problem with Summation Symbol
  • Next by Date: Re: DynamicModule question
  • Previous by thread: Re: ListDensityPlot with irregular data and InterpolationOrder
  • Next by thread: Stop cell tags propagating to generated cells