# Pluto plots with PlotlyBase/PlotlyJS with working static html export

**URL:** <https://discourse.julialang.org/t/pluto-plots-with-plotlybase-plotlyjs-with-working-static-html-export/61730>\
**Category:** Pluto\
**Created:** [May 24, 2021, 4:24pm UTC](https://discourse.julialang.org/t/pluto-plots-with-plotlybase-plotlyjs-with-working-static-html-export/61730 "2021-05-24T16:24:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![VivMendes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vivmendes/32/16477_2.png) [@VivMendes](https://discourse.julialang.org/u/VivMendes)\
**Post date:** [May 30, 2021, 9:46pm UTC](https://discourse.julialang.org/t/pluto-plots-with-plotlybase-plotlyjs-with-working-static-html-export/61730/2 "2021-05-30T21:46:44Z")

</div>

@disberd This is a remarkable small piece of code. You have nailed it: **PlotlyJS working without any problem at all inside Pluto notebooks**. Moreover, we can have the plot displayed within Pluto’s window, or we can export it as an HTML file.

I tested your example and I just added some new cells where I experimented with different types of plots (2D, 3D, etc.). They all worked in an immaculate way. We can save the plots in html, png, pdf, svg formats. The only thing that I had to change is the name of the plot function: in VSCode we plot with `plot()`, in your approach we have to start it with a capital letter `Plot()`.

I tried this piece of code (typical PlotlyJS syntax):

```julia
begin
	n = 200
	r = LinRange(1e-4,10,n)
	k = LinRange(0,2π,n)
	g = r * cos.(k)'
	f = r * sin.(k)'
	z = (g.^2 .* f.^2) ./ (g.^4 + f.^4)
	#p5 = Plot(surface(x=g,y=f,z=z),Layout(width=700,height=500))
	p5 = Plot(surface(x=g,y=f,z=z))
end

```

and it took just 2.5ms to get the plot below (while it takes 4s in Jupyter!!!). In case someone has doubts, here it is:

 ![aa](https://global.discourse-cdn.com/julialang/original/3X/b/5/b51ebe90ac31ce89537d96000f38babf26c6c5e4.png)

Congrats. Wonderful job.

---

_[View the full topic](https://discourse.julialang.org/t/pluto-plots-with-plotlybase-plotlyjs-with-working-static-html-export/61730)._
