# Unexpected local variables in SliceContourPlot3D?

**URL:** <https://community.wolfram.com/t/unexpected-local-variables-in-slicecontourplot3d/17879>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [March 26, 2021, 6:13am UTC](https://community.wolfram.com/t/unexpected-local-variables-in-slicecontourplot3d/17879 "2021-03-26T06:13:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikolayshilov1997](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/nikolayshilov1997/32/7843_2.png) [@nikolayshilov1997](https://community.wolfram.com/u/nikolayshilov1997)\
**Post date:** [March 26, 2021, 6:13am UTC](https://community.wolfram.com/t/unexpected-local-variables-in-slicecontourplot3d/17879/1 "2021-03-26T06:13:29Z")

</div>

Hello!

Today I was trying to display a slice plot of a function of three coordinates using `SliceContourPlot3D` and noticed an unexpected side-effect: local variables which were used inside this function remain in the system and retain their numerical values.

For example, running the very first example from the Documentation Center:

```
SliceContourPlot3D[
 Exp[-(x^2 + y^2 + z^2)], "CenterPlanes", {x, -2, 2}, {y, -2, 
  2}, {z, -2, 2}]

```

creates three local variables i.e. `x`, `y` and `z` with their `OwnValues` being 2., 2. and 2. respectively. It appears that these values correspond to the upper plotting bounds inside the `SliceContourPlot3D` function.

The worst thing is actually that I cannot clear these values and turn my `x`, `y` and `z` back into symbols - `ClearAll[x, y, z]` throws an error “Cannot clear local variable z”. Is it a known bug / already reported issue? Are there wayarounds?

---

<div class="post-metadata">

**Author:** ![wolframcommunity](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/wolframcommunity/32/8335_2.png) [@wolframcommunity](https://community.wolfram.com/u/wolframcommunity)\
**Post date:** [March 26, 2021, 1:44pm UTC](https://community.wolfram.com/t/unexpected-local-variables-in-slicecontourplot3d/17879/2 "2021-03-26T13:44:27Z")

</div>

Wolfram developers are aware of this issue. We thank you for reporting it.

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [March 26, 2021, 1:47pm UTC](https://community.wolfram.com/t/unexpected-local-variables-in-slicecontourplot3d/17879/3 "2021-03-26T13:47:15Z")

</div>

Hi Nikolay,

That looks like a bug. Existing values are overwritten. It is as if symbols scoped using `Block` are not being restored to their value in the outer scope. You should report it to Wolfram Support.

You can use `Remove[x, y, z]` to remove the symbols or `Clear[x, y, z]` to remove the `OwnValues`.
