# Problem with PlotRange as an option to ContourPlot

**URL:** <https://community.wolfram.com/t/problem-with-plotrange-as-an-option-to-contourplot/17430>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [January 16, 2021, 3:51pm UTC](https://community.wolfram.com/t/problem-with-plotrange-as-an-option-to-contourplot/17430 "2021-01-16T15:51:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![udibehar](https://avatars.discourse-cdn.com/v4/letter/u/eb8c5e/32.png) [@udibehar](https://community.wolfram.com/u/udibehar)\
**Post date:** [January 16, 2021, 3:51pm UTC](https://community.wolfram.com/t/problem-with-plotrange-as-an-option-to-contourplot/17430/1 "2021-01-16T15:51:41Z")

</div>

Please help me solve a “clipping” issue arising in a Plot I am working on.

Compare these two commands: Definition for the surface `surf` is at the end on the post.

1. 

```
ContourPlot[surf[y, x], {x, 0, 1024}, {y, 0, 256},
 ColorFunction -> "DarkRainbow",
 PlotRange -> All]

```

1. 

```
ContourPlot[surf[y, x], {x, 0, 1024}, {y, 0, 256},
 ColorFunction -> "DarkRainbow",
 PlotRange -> {{0, 1024}, {0, 256}}]

```

 ![90302plots.png](https://global.discourse-cdn.com/wolfram/original/2X/3/3b382cdd8f11a44625f64e401f0d71b0f5c6a503.png)

The first one looks fine, you can see all the contours.

But for the second one, some of the contours disappear and the colors turn to white at the center of the plot.

Beside that, plot #1 is not Framed, whereas plot #2 is.

Why is that?

Definition for `surf`:

```
A = 800000;
a = 80;
b = 0.0007;
surf = Function[{x, y}, 
  A (Exp[-b (x - 90)^2] + Exp[-b (x - 90 - 70)^2])/((y - 512)^2 + a^2) ]

```

---

<div class="post-metadata">

**Author:** ![jbaldwinpsw](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jbaldwinpsw](https://community.wolfram.com/u/jbaldwinpsw)\
**Post date:** [January 16, 2021, 7:20pm UTC](https://community.wolfram.com/t/problem-with-plotrange-as-an-option-to-contourplot/17430/2 "2021-01-16T19:20:31Z")

</div>

For `ContourPlot`, `PlotRange` has a 3rd argument for the “height” of the contour plot. Try

```
PlotRange -> {{0, 1024}, {0, 256}, All}

```

The default is

```
{Full, Full, Automatic}

```

---

<div class="post-metadata">

**Author:** ![udibehar](https://avatars.discourse-cdn.com/v4/letter/u/eb8c5e/32.png) [@udibehar](https://community.wolfram.com/u/udibehar)\
**Post date:** [January 16, 2021, 7:45pm UTC](https://community.wolfram.com/t/problem-with-plotrange-as-an-option-to-contourplot/17430/3 "2021-01-16T19:45:49Z")

</div>

Perfect! I should have thought about it myself.

Thanks a lot.
