1
$\begingroup$

This question already has an answer here:

Given that

x1 = 
  -((π^2 (x - x0) Cosh[π (x - x0)]) /
   (2 (-Cos[π (y - y0)] + Cosh[π (x - x0)]))) + (π^2 (x - x0) Cosh[π (x - x0)]) / 
   ( 2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])) + (π^2 (x - x0) Sinh[π (x - x0)]^2) / 
   ( 2 (-Cos[π (y - y0)] + Cosh[π (x - x0)])^2) - (π^2 (x - x0) Sinh[π (x - x0)]^2) / 
   ( 2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])^2)

I want to do a density plot by using:

DensityPlot[ x1 /. {x0 -> 0, y0 -> 0.2}, {x, -0.5, 0.5}, {y, -0.5, 0.5}]

Mathematica graphics

But there are some white regions which are not plotted by density color. How to plot the density color also in the white regions?

$\endgroup$

marked as duplicate by Michael E2, Jens, Yves Klett, Rahul, ciao Jul 5 '14 at 19:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Try PlotRange->All $\endgroup$ – Kuba Jul 5 '14 at 15:25
  • $\begingroup$ Use PlotPoints -> 80 $\endgroup$ – molekyla777 Jul 5 '14 at 15:29
1
$\begingroup$

ContourPlot gives a clearer picture here:

ContourPlot[x1 /. {x0 -> 0, y0 -> 0.2}, {x, -0.5, 0.5}, {y, -0.5, 0.5},
 PlotRange -> All,
 PlotPoints -> 15,
 ContourLines -> False,
 ColorFunction -> "DarkRainbow"]

enter image description here

Compare:

DensityPlot[x1 /. {x0 -> 0, y0 -> 0.2}, {x, -0.5, 0.5}, {y, -0.5, 0.5},
 PlotRange -> All,
 PlotPoints -> 50,
 ColorFunction -> "DarkRainbow"]

enter image description here

ADDENDUM

Or concentrate on the "critical area":

DensityPlot[x1 /. {x0 -> 0, y0 -> 0.2}, {x, -0.5, 0.5}, {y, -0.5, 0.5},
 PlotRange -> {{-0.3, 0.3}, {-0.1, 0.5}},
 PlotPoints -> 100,
 ClippingStyle -> {Blue, Red},
 ColorFunction -> "DarkRainbow"]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.