# Adding a 3d curve to a 3d surface plot breaks the surface colourmap

**URL:** https://discourse.julialang.org/t/adding-a-3d-curve-to-a-3d-surface-plot-breaks-the-surface-colourmap/48059
**Category:** Visualization
**Created:** [October 9, 2020, 6:18pm UTC](https://discourse.julialang.org/t/adding-a-3d-curve-to-a-3d-surface-plot-breaks-the-surface-colourmap/48059 "2020-10-09T18:18:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gregstrq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gregstrq/32/20620_2.png) [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)
#### Post date: [October 9, 2020, 6:18pm UTC](https://discourse.julialang.org/t/adding-a-3d-curve-to-a-3d-surface-plot-breaks-the-surface-colourmap/48059/1 "2020-10-09T18:18:15Z")

</div>

I am trying to add a 3d curve to a 3d surface plot.  
Without the curve, the surface plot functions as expected: it has different colours for different values along the z axis.  
However, if I try to add a 3d curve, the colouring of the surface gets broken: a single colour is used for the whole surface (it seems to be the colour which corresponds to zero value on the colourmap).

How can I fix this problem? The backend I am using is PyPlot.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [October 9, 2020, 6:55pm UTC](https://discourse.julialang.org/t/adding-a-3d-curve-to-a-3d-surface-plot-breaks-the-surface-colourmap/48059/2 "2020-10-09T18:55:58Z")

</div>

Please provide a minimal example.
