# 3d plot plotly vs plotlyjs

**URL:** <https://discourse.julialang.org/t/3d-plot-plotly-vs-plotlyjs/51907>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [December 16, 2020, 4:14am UTC](https://discourse.julialang.org/t/3d-plot-plotly-vs-plotlyjs/51907 "2020-12-16T04:14:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![espin](https://avatars.discourse-cdn.com/v4/letter/e/e9bcb4/32.png) [@espin](https://discourse.julialang.org/u/espin)\
**Post date:** [December 16, 2020, 4:14am UTC](https://discourse.julialang.org/t/3d-plot-plotly-vs-plotlyjs/51907/1 "2020-12-16T04:14:17Z")

</div>

So I have a 2 dimensional array I want to plot as a 3d surface in plotlyjs, the problem is that is not working on plotlyjs even though it works ok on plotly.

Here is an example:

```julia
using Plots
plotly()
A=reshape(repeat(sin.(collect(0:0.1:6)),6),61,6)
plot(A,linetype=:surface)

```

produces a pretty 3d surface:  
 ![](https://global.discourse-cdn.com/julialang/original/3X/7/e/7ee0d4283e8a5d9e4e9235045839a3787b8029c5.png)

While plotlyjs

```julia
using PlotlyJS
A=reshape(repeat(sin.(collect(0:0.1:6)),6),61,6)
plot(A,linetype=:surface)

```

produces a 6 simple lines that are overlapped:

 ![](https://global.discourse-cdn.com/julialang/original/3X/1/3/135722c693a33f9afe974fe7dc79a096c5bd9246.png)

How should I format my data or call the plot function to obtain the graph I’m getting with Plots.plotly() in PlotlyJS ???

---

<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:** [December 16, 2020, 6:17am UTC](https://discourse.julialang.org/t/3d-plot-plotly-vs-plotlyjs/51907/2 "2020-12-16T06:17:08Z")

</div>

I think you are confusing two things:

- The `Plots.jl` package with the Plotly “backend”
- The `PlotlyJS.jl` package.

These are two different packages, with different syntax. You need to use the right syntax for the right package.

Unfortunately it seems that they use the “same” function name to mean different things with regards to 3-dimensional data.
