# PlotlyJS vs Plots+plotlyjs()

**URL:** <https://discourse.julialang.org/t/plotlyjs-vs-plots-plotlyjs/46179>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [September 7, 2020, 7:08am UTC](https://discourse.julialang.org/t/plotlyjs-vs-plots-plotlyjs/46179 "2020-09-07T07:08:47Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 19, 2020, 9:20pm UTC](https://discourse.julialang.org/t/plotlyjs-vs-plots-plotlyjs/46179/7 "2020-09-19T21:20:01Z")

</div>

The correct solution is not to set the height and width, but to set `autosize`:

```julia
layout = Layout(;autosize = true, 
  xaxis = attr(title="x", range=[0.0, L]), 
  yaxis = attr(title = "F", range=[-1.0, 1.0]))

```

Then the figure is responsive during the simulation as well as after.  
 ![s](https://global.discourse-cdn.com/julialang/original/3X/f/7/f707e48e2718bda7def621431596dddca8fcb4d6.gif)

---

_[View the full topic](https://discourse.julialang.org/t/plotlyjs-vs-plots-plotlyjs/46179)._
