# 3D line plots?

**URL:** https://discourse.julialang.org/t/3d-line-plots/9921
**Category:** Visualization
**Created:** [March 23, 2018, 3:21pm UTC](https://discourse.julialang.org/t/3d-line-plots/9921 "2018-03-23T15:21:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [March 23, 2018, 3:21pm UTC](https://discourse.julialang.org/t/3d-line-plots/9921/1 "2018-03-23T15:21:06Z")

</div>

Yesterday, March 22, I did a 3D line plot using Plots/PyPlot:

x = linspace(-2π,2π)  
plot(x,sin.(x),cos.(x))

This worked fine. Today, I did Pkg.update(), and re-ran the code. Doesn’t work, and I get long error message…

PyError (ccall(@pysym(:PyObject\_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, arg, kw)) \<type ‘exceptions.ValueError’\>  
ValueError(u"Unknown projection ‘3d’",)  
… etc., etc.

–  
Anyone got an idea why? (I’m trying to figure out how to use Plots…)

---

<div class="post-metadata">

### Author: ![crbinz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crbinz/32/1919_2.png) [@crbinz](https://discourse.julialang.org/u/crbinz)
#### Post date: [March 23, 2018, 3:35pm UTC](https://discourse.julialang.org/t/3d-line-plots/9921/2 "2018-03-23T15:35:46Z")

</div>

I get the same error at first using `Plots` with the `pyplot()` backend, but interestingly `PyPlot.plot3D(x, sin.(x), cos.(x))` works, then when I try `Plots.plot(x, sin.(x), cos.(x))` again, it also works.

```julia
julia> Pkg.status.(("Plots","PyPlot"))
 - Plots 0.15.1
 - PyPlot 2.5.0

```

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [March 23, 2018, 4:00pm UTC](https://discourse.julialang.org/t/3d-line-plots/9921/3 "2018-03-23T16:00:23Z")

</div>

Thanks for tip. So…

plot(x,sin.(x),cos.(x))

used to work yesterday, but crashes today.

If I instead type:

PyPlot.plot3D(x,sin.(x),cos.(x))

the response is:

1-element Array{PyCall.PyObject,1}:  
PyObject \<mpl\_toolkits.mplot3d.art3d.Line3D object at 0x000000000318D278\>

If I next type:

plot(x,sin.(x),cos.(x))

this now works. FURTHERMORE… I can then invoke other 3D line plots, e.g.

plot(x,sinh.(x),cosh.(x))

and it works right away, without using the PyPlot.plot3D command in between.

Seems like command PyPlot.plot3D loads some function into my Jupyter session (64 bit Win 10)…

Question: is this a willed change, or a bug?

---

<div class="post-metadata">

### Author: ![crbinz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crbinz/32/1919_2.png) [@crbinz](https://discourse.julialang.org/u/crbinz)
#### Post date: [March 27, 2018, 1:39am UTC](https://discourse.julialang.org/t/3d-line-plots/9921/4 "2018-03-27T01:39:24Z")

</div>

> [@BLI](#):
>
> Question: is this a willed change, or a bug?

Almost certainly a bug, I filed an issue [here](https://github.com/JuliaPlots/Plots.jl/issues/1457). (Sorry, I forgot about this topic until the same issue happened with me)
