# Custom MeshFunctions in SphericalPlot3D

**URL:** <https://community.wolfram.com/t/custom-meshfunctions-in-sphericalplot3d/8289>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [April 5, 2016, 6:35am UTC](https://community.wolfram.com/t/custom-meshfunctions-in-sphericalplot3d/8289 "2016-04-05T06:35:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirschle](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@chirschle](https://community.wolfram.com/u/chirschle)\
**Post date:** [April 5, 2016, 6:35am UTC](https://community.wolfram.com/t/custom-meshfunctions-in-sphericalplot3d/8289/1 "2016-04-05T06:35:43Z")

</div>

Hello,

Whenever I try to modify the MeshFunctions which SphericalPlot3D uses, Mathematica plots an additional mesh line in the xz-plane. For example

```
x := Sin[\[Phi]]*Cos[\[Theta]]
y := Sin[\[Phi]]*Sin[\[Theta]]
z := Cos[\[Phi]]
SphericalPlot3D[
5*x^2 + 10*y^2 + 3*z^2, {\[Phi], 0, 2 \[Pi]}, {\[Theta], 0, \[Pi]},
ColorFunction -> (ColorData["TemperatureMap"][#6] &),
MeshFunctions -> {#6 &},
Mesh -> {8}
]

```

results in

[Minimalbeispiel.bmp](https://community.wolfram.com/uploads/short-url/6Oa38ClTEpxcnjfvCeSAsMnRC2E.bmp) (375 KB)

Does anyone know what’s causing this behaviour and how to stop it? I’m using Mathematica 10.0.1.0 Student Edition.

Thank you!

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [April 5, 2016, 7:18am UTC](https://community.wolfram.com/t/custom-meshfunctions-in-sphericalplot3d/8289/2 "2016-04-05T07:18:42Z")

</div>

What you are seeing is the boundary of the parametric surface, at theta=0 and theta=Pi. To get rid of the boundary use BoundaryStyle:

```
With[{x = Sin[\[Phi]]*Cos[\[Theta]], y = Sin[\[Phi]]*Sin[\[Theta]], 
  z = Cos[\[Phi]]},
 SphericalPlot3D[
  5*x^2 + 10*y^2 + 3*z^2, {\[Phi], 0, 2 \[Pi]}, {\[Theta], 0, \[Pi]},
   ColorFunction -> (ColorData["TemperatureMap"][#6] &), 
  MeshFunctions -> {#6 &}, Mesh -> {8}, BoundaryStyle -> None]]

```

---

<div class="post-metadata">

**Author:** ![chirschle](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@chirschle](https://community.wolfram.com/u/chirschle)\
**Post date:** [April 5, 2016, 7:42am UTC](https://community.wolfram.com/t/custom-meshfunctions-in-sphericalplot3d/8289/3 "2016-04-05T07:42:53Z")

</div>

Thank you very much! This completely resolves the issue.
