# Looking for more detailed documentation of \`PlotlyLight.jl\`

**URL:** https://discourse.julialang.org/t/looking-for-more-detailed-documentation-of-plotlylight-jl/111009
**Category:** General Usage
**Tags:** package, documentation, plotlylight
**Created:** [March 1, 2024, 10:53am UTC](https://discourse.julialang.org/t/looking-for-more-detailed-documentation-of-plotlylight-jl/111009 "2024-03-01T10:53:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 10:53am UTC](https://discourse.julialang.org/t/looking-for-more-detailed-documentation-of-plotlylight-jl/111009/1 "2024-03-01T10:53:32Z")

</div>

I found that the `PlotlyLight` package is very good and very useful to me, but its documentation is currently a bit brief (or I didn’t find it in the right place). Is there any more detailed instructions on its use? Thanks in advance!

---

<div class="post-metadata">

### Author: ![joshday](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joshday/32/368_2.png) [@joshday](https://discourse.julialang.org/u/joshday)
#### Post date: [March 25, 2024, 8:06pm UTC](https://discourse.julialang.org/t/looking-for-more-detailed-documentation-of-plotlylight-jl/111009/2 "2024-03-25T20:06:14Z")

</div>

PlotlyLight author here!

You’re meant to use Plotly’s Javascript docs ([Plotly javascript graphing library in JavaScript](https://plotly.com/javascript/)) directly, as PlotlyLight is a fairly minimal “layer” over the Javascript.

That being said, it would be a good idea to find a good tutorial to link to in the README.

---

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 26, 2024, 1:25am UTC](https://discourse.julialang.org/t/looking-for-more-detailed-documentation-of-plotlylight-jl/111009/3 "2024-03-26T01:25:35Z")

</div>

Thanks! 🤝 🤝

---

<div class="post-metadata">

### Author: ![jjstickel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jjstickel/32/19536_2.png) [@jjstickel](https://discourse.julialang.org/u/jjstickel)
#### Post date: [July 13, 2025, 2:08am UTC](https://discourse.julialang.org/t/looking-for-more-detailed-documentation-of-plotlylight-jl/111009/4 "2025-07-13T02:08:51Z")

</div>

Although it is helpful to point to the Plotly javascript docs, that doesn’t explain syntax translation. What Julia syntax (and data structures) correspond to the construction of `data` and `layout`? What PlotlyLight function is used to create a plot from `data` and `layout`? From what I can tell, `plot()` has minimal functionality for creating a plot of a single data set, but `Plot()` corresponds to the JavaScript `newPlot()`. This is what I have figured out so far:

```julia
import PlotlyLight as PL
x = collect(range(0.0, 2.0, length=50))
data = [PL.Config(x=x, y=x, mode="lines", name="series A")
       PL.Config(x=x, y=sqrt.(x), mode="lines", name="series B")]
layout = PL.Config(width=800, height=600, title = Dict(:text=>"title text"))
PL.Plot(data, layout) 

```

---

<div class="post-metadata">

### Author: ![stephancb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stephancb/32/14243_2.png) [@stephancb](https://discourse.julialang.org/u/stephancb)
#### Post date: [July 14, 2025, 10:07am UTC](https://discourse.julialang.org/t/looking-for-more-detailed-documentation-of-plotlylight-jl/111009/6 "2025-07-14T10:07:31Z")

</div>

Your example corresponds to [these instructions](https://plotly.com/javascript/reference/index/) of the Plotly JS docs and it works also for me. To generate the same plot in the style as shown [here](https://github.com/JuliaComputing/PlotlyLight.jl?tab=readme-ov-file#-quickstart):

```julia
p = plot(x=x, y=x, mode="lines", name="series A");
p(x=x, y=sqrt.(x), mode="lines", name="series B"); # <-- this part has disappeared from the 'PlotllyLight.jl' documentation
p.layout.width=800
p.layout.height=600
p.layout.title.text="title text"

```

So to add traces to your plot created with a 1st trace as `p=plot(...)`, call the plot object `p(x=..., y=,..., type="...", ...)`
