1
$\begingroup$

I have a dataset (listed below). I'm trying to plot the dataset using ListDensity plot;

ListDensityPlot[dataset, InterpolationOrder -> 0, 
 PlotLegends -> Automatic, PlotRange -> All, Mesh -> All]

When I sample infrequently, so that the data set is small, everything is fine ...

ListDensityPlot with small dataset

But when I sample more frequently, ListDensityPlot creates a flat region (beige) that is NOT present in the data ...

ListDensityPlot with larger dataset

Any help or advice would be greatly appreciated!

For reference, the two datasets are

Small:

{{25, 0., 3.25504}, {25, 0.025, 3.03122}, {25, 0.05, 2.80847}, {25, 
  0.075, 2.5882}, {25, 0.1, 2.37189}, {75, 0., 3.34178}, {75, 0.025, 
  2.65662}, {75, 0.05, 2.00862}, {75, 0.075, 1.43803}, {75, 0.1, 
  0.974322}, {125, 0., 3.35954}, {125, 0.025, 2.22964}, {125, 0.05, 
  1.27735}, {125, 0.075, 0.630202}, {125, 0.1, 0.274333}}

Large:

{{25, 0., 3.25504}, {25, 0.01, 3.16547}, {25, 0.02, 3.07594}, {25, 
  0.03, 2.98654}, {25, 0.04, 2.89735}, {25, 0.05, 2.80847}, {25, 0.06,
   2.71998}, {25, 0.07, 2.63198}, {25, 0.08, 2.54457}, {25, 0.09, 
  2.45784}, {25, 0.1, 2.37189}, {75, 0., 3.34178}, {75, 0.01, 
  3.06587}, {75, 0.02, 2.792}, {75, 0.03, 2.52271}, {75, 0.04, 
  2.26069}, {75, 0.05, 2.00862}, {75, 0.06, 1.76907}, {75, 0.07, 
  1.54428}, {75, 0.08, 1.33612}, {75, 0.09, 1.14588}, {75, 0.1, 
  0.974322}, {125, 0., 3.35954}, {125, 0.01, 2.8982}, {125, 0.02, 
  2.44732}, {125, 0.03, 2.01923}, {125, 0.04, 1.62598}, {125, 0.05, 
  1.27735}, {125, 0.06, 0.979442}, {125, 0.07, 0.733926}, {125, 0.08, 
  0.538418}, {125, 0.09, 0.387549}, {125, 0.1, 0.274333}, {175, 0., 
  3.36719}, {175, 0.01, 2.72209}, {175, 0.02, 2.1072}, {175, 0.03, 
  1.55594}, {175, 0.04, 1.09479}, {175, 0.05, 0.73559}, {175, 0.06, 
  0.474159}, {175, 0.07, 0.294993}, {175, 0.08, 0.17825}, {175, 0.09, 
  0.105215}, {175, 0.1, 0.0609632}, {225, 0., 3.37143}, {225, 0.01, 
  2.54503}, {225, 0.02, 1.78468}, {225, 0.03, 1.15598}, {225, 0.04, 
  0.693407}, {225, 0.05, 0.38893}, {225, 0.06, 0.206657}, {225, 0.07, 
  0.10536}, {225, 0.08, 0.0520935}, {225, 0.09, 0.0251863}, {225, 0.1,
   0.011985}, {275, 0., 3.37413}, {275, 0.01, 2.36971}, {275, 0.02, 
  1.48715}, {275, 0.03, 0.829508}, {275, 0.04, 0.416294}, {275, 0.05, 
  0.19227}, {275, 0.06, 0.0836399}, {275, 0.07, 0.0349119}, {275, 
  0.08, 0.0141767}, {275, 0.09, 0.00566518}, {275, 0.1, 
  0.00225865}, {325, 0., 3.376}, {325, 0.01, 2.19763}, {325, 0.02, 
  1.21954}, {325, 0.03, 0.576578}, {325, 0.04, 0.239136}, {325, 0.05, 
  0.0904544}, {325, 0.06, 0.0322287}, {325, 0.07, 0.0110721}, {325, 
  0.08, 0.00374375}, {325, 0.09, 0.00128508}, {325, 0.1, 
  0.000478527}, {375, 0., 3.37736}, {375, 0.01, 2.02993}, {375, 0.02, 
  0.984654}, {375, 0.03, 0.389649}, {375, 0.04, 0.132673}, {375, 0.05,
   0.041089}, {375, 0.06, 0.0120503}, {375, 0.07, 0.0034607}, {375, 
  0.08, 0.00102748}, {375, 0.09, 0.000357863}, {375, 0.1, 
  0.000177356}, {425, 0., 3.3784}, {425, 0.01, 1.86755}, {425, 0.02, 
  0.783308}, {425, 0.03, 0.257056}, {425, 0.04, 0.0716749}, {425, 
  0.05, 0.0182314}, {425, 0.06, 0.00445654}, {425, 0.07, 
  0.00112607}, {425, 0.08, 0.000352191}, {425, 0.09, 
  0.000177144}, {425, 0.1, 0.000138316}, {475, 0., 3.37922}, {475, 
  0.01, 1.71129}, {475, 0.02, 0.614545}, {475, 0.03, 0.166205}, {475, 
  0.04, 0.0379629}, {475, 0.05, 0.00798815}, {475, 0.06, 
  0.00168463}, {475, 0.07, 0.000435347}, {475, 0.08, 
  0.00019679}, {475, 0.09, 0.000152387}, {475, 0.1, 
  0.000144276}, {525, 0., 3.37987}, {525, 0.01, 1.56184}, {525, 0.02, 
  0.476022}, {525, 0.03, 0.105707}, {525, 0.04, 0.0198299}, {525, 
  0.05, 0.00350805}, {525, 0.06, 0.000699413}, {525, 0.07, 
  0.000242271}, {525, 0.08, 0.000170453}, {525, 0.09, 
  0.000159445}, {525, 0.1, 0.000157788}, {575, 0., 3.38041}, {575, 
  0.01, 1.41975}, {575, 0.02, 0.364477}, {575, 0.03, 0.0663431}, {575,
   0.04, 0.0102764}, {575, 0.05, 0.00158704}, {575, 0.06, 
  0.000360887}, {575, 0.07, 0.000196785}, {575, 0.08, 
  0.000175559}, {575, 0.09, 0.000172879}, {575, 0.1, 
  0.000172546}, {625, 0., 3.38086}, {625, 0.01, 1.2855}, {625, 0.02, 
  0.276191}, {625, 0.03, 0.0412046}, {625, 0.04, 0.00532472}, {625, 
  0.05, 0.000779192}, {625, 0.06, 0.000252417}, {625, 0.07, 
  0.000194398}, {625, 0.08, 0.000188216}, {625, 0.09, 
  0.000187573}, {625, 0.1, 0.000187507}, {675, 0., 3.38124}, {675, 
  0.01, 1.15941}, {675, 0.02, 0.207377}, {675, 0.03, 0.0253918}, {675,
   0.04, 0.00279299}, {675, 0.05, 0.000448124}, {675, 0.06, 
  0.000224708}, {675, 0.07, 0.000204446}, {675, 0.08, 
  0.000202667}, {675, 0.09, 0.000202514}, {675, 0.1, 
  0.000202501}, {725, 0., 3.38157}, {725, 0.01, 1.04169}, {725, 0.02, 
  0.154462}, {725, 0.03, 0.0155672}, {725, 0.04, 0.00151486}, {725, 
  0.05, 0.000318814}, {725, 0.06, 0.00022505}, {725, 0.07, 
  0.000218045}, {725, 0.08, 0.000217539}, {725, 0.09, 
  0.000217503}, {725, 0.1, 0.0002175}, {775, 0., 3.38185}, {775, 0.01,
   0.932418}, {775, 0.02, 0.114246}, {775, 0.03, 0.00952547}, {775, 
  0.04, 0.000878491}, {775, 0.05, 0.000274063}, {775, 0.06, 
  0.000235054}, {775, 0.07, 0.000232652}, {775, 0.08, 
  0.000232509}, {775, 0.09, 0.000232501}, {775, 0.1, 0.0002325}, {825,
   0., 3.38209}, {825, 0.01, 0.831578}, {825, 0.02, 0.0839943}, {825, 
  0.03, 0.00584262}, {825, 0.04, 0.000567567}, {825, 0.05, 
  0.00026447}, {825, 0.06, 0.00024836}, {825, 0.07, 
  0.000247542}, {825, 0.08, 0.000247502}, {825, 0.09, 
  0.0002475}, {825, 0.1, 0.0002475}, {875, 0., 3.3823}, {875, 0.01, 
  0.739036}, {875, 0.02, 0.0614382}, {875, 0.03, 0.00361527}, {875, 
  0.04, 0.000420403}, {875, 0.05, 0.000269401}, {875, 0.06, 
  0.000262788}, {875, 0.07, 0.000262512}, {875, 0.08, 
  0.0002625}, {875, 0.09, 0.0002625}, {875, 0.1, 0.0002625}, {925, 0.,
   3.38249}, {925, 0.01, 0.654567}, {925, 0.02, 0.0447492}, {925, 
  0.03, 0.00227834}, {925, 0.04, 0.000355108}, {925, 0.05, 
  0.000280296}, {925, 0.06, 0.000277596}, {925, 0.07, 
  0.000277503}, {925, 0.08, 0.0002775}, {925, 0.09, 0.0002775}, {925, 
  0.1, 0.0002775}, {975, 0., 3.38266}, {975, 0.01, 0.57787}, {975, 
  0.02, 0.0324836}, {975, 0.03, 0.00148225}, {975, 0.04, 
  0.000330517}, {975, 0.05, 0.000293629}, {975, 0.06, 
  0.000292532}, {975, 0.07, 0.000292501}, {975, 0.08, 
  0.0002925}, {975, 0.09, 0.0002925}, {975, 0.1, 0.00029216}, {1025, 
  0., 3.38281}, {1025, 0.01, 0.508576}, {1025, 0.02, 
  0.0235217}, {1025, 0.03, 0.00101271}, {1025, 0.04, 
  0.000326068}, {1025, 0.05, 0.000307955}, {1025, 0.06, 
  0.000307511}, {1025, 0.07, 0.0003075}, {1025, 0.08, 
  0.0003075}, {1025, 0.09, 0.000307114}, {1025, 0.1, 0.000307224}}
$\endgroup$
  • 1
    $\begingroup$ Look carefully at ListPointPlot3D[dataset, PlotRange -> All]; it'll show you the issue with your dataset. $\endgroup$ – corey979 Oct 14 '16 at 14:59
  • $\begingroup$ Welcome! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – user9660 Oct 14 '16 at 16:45
  • 2
    $\begingroup$ ListDensityPlot[Log[dataset], ... ] looks nice. $\endgroup$ – march Oct 14 '16 at 19:36
  • $\begingroup$ This is a problem with the triangulation algorithm which does not like extreme aspect ratios. The simplest workaround is to rescale one of the axes e.g. dataset[[All, 2]] *= 10000; $\endgroup$ – Simon Woods Oct 14 '16 at 20:25
  • $\begingroup$ Simon Woods' solution identifies the problem and is a neat workaround! Logging the dataset works because it reduces the difference between the difference in the aspect ratio. Thanks, this is great! $\endgroup$ – anonMatUser Oct 17 '16 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.