# Graphing a large, tiled graph with PlotlyJS

**URL:** <https://discourse.julialang.org/t/graphing-a-large-tiled-graph-with-plotlyjs/53979>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [January 26, 2021, 1:17pm UTC](https://discourse.julialang.org/t/graphing-a-large-tiled-graph-with-plotlyjs/53979 "2021-01-26T13:17:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/smack/32/30102_2.png) [@Smack](https://discourse.julialang.org/u/Smack)\
**Post date:** [January 26, 2021, 1:17pm UTC](https://discourse.julialang.org/t/graphing-a-large-tiled-graph-with-plotlyjs/53979/1 "2021-01-26T13:17:45Z")

</div>

Hi,  
I am trying to plot multiple scatter plots and save them in a file (svg/pdf)  
After creating the plots and saving them in a variable, I find the only way I can tile them is with the splatter operator:  
_[plots\_array…]_  
and then saving with _PlotlyJS.savefig._  
However, the size of the image is very small, and all the graphs are squeezed together.  
How can I force the graph or at least its saved version to be larger? (preferably several screens height worth)  
Thank you!  
P.S. I am using visual studio code as my IDE

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [January 26, 2021, 1:27pm UTC](https://discourse.julialang.org/t/graphing-a-large-tiled-graph-with-plotlyjs/53979/2 "2021-01-26T13:27:17Z")

</div>

Are you talking about a bunch of scatters plotted inside the same axes? That is, with the same x and y axis? Or do you want a new white space with new axes for each scatter-series, and have all of those plots in some sort of grid, together creating one large figure?

---

<div class="post-metadata">

**Author:** ![Smack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/smack/32/30102_2.png) [@Smack](https://discourse.julialang.org/u/Smack)\
**Post date:** [January 26, 2021, 1:57pm UTC](https://discourse.julialang.org/t/graphing-a-large-tiled-graph-with-plotlyjs/53979/3 "2021-01-26T13:57:12Z")

</div>

The latter.

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [January 26, 2021, 2:22pm UTC](https://discourse.julialang.org/t/graphing-a-large-tiled-graph-with-plotlyjs/53979/4 "2021-01-26T14:22:36Z")

</div>

Edit: I uploaded the wrong file, with funny titles. Fixed now.  
Try this:

```julia
using Plots #This looks much better with GR, is that fine?
myplots = [plot(randn(10), title="Title $i", label="Line number $i") for i in 1:20]
myplot = plot(myplots..., layout=(4, 5), size=(2000, 2000))
savefig(myplot, raw"C:\Users\username\OneDrive\myplot.pdf")

```

This results in this pdf for me  
[https://docdro.id/JpGJ147](https://docdro.id/JpGJ147)

Is that what you are looking for?  
Alternatively, I think you can do this very nicely with Makie.

---

<div class="post-metadata">

**Author:** ![Smack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/smack/32/30102_2.png) [@Smack](https://discourse.julialang.org/u/Smack)\
**Post date:** [January 26, 2021, 2:26pm UTC](https://discourse.julialang.org/t/graphing-a-large-tiled-graph-with-plotlyjs/53979/5 "2021-01-26T14:26:25Z")

</div>

> [@TheLateKronos](#):
>
> ```julia
> myplots = [plot(randn(10), title="Title $i", label="Line number $i") for i in 1:20]
> myplot = plot(myplots..., layout=(4, 5), size=(2000, 2000))
> 
> ```

This does not run for me…  
I get for the 2nd command:  
ERROR: LoadError: MethodError: no method matching Plot(::PlotlyJS.SyncPlot, ::PlotlyJS.SyncPlot, ::PlotlyJS.SyncPlot, ::PlotlyJS.SyncPlot, ::PlotlyJS.SyncPlot; layout=(4, 5), size=(2000, 2000))  
Closest candidates are:  
Plot(::AbstractArray{var"#s13",1} where var"#s13"\<:AbstractTrace, ::Any) at C:\Users\LabSolver.julia\packages\PlotlyBase\NxSlF\src\PlotlyBase.jl:60 got unsupported keyword arguments “layout”, “size”  
Plot(::AbstractArray{var"#s12",1} where var"#s12"\<:AbstractTrace, ::Any, ::AbstractArray{var"#s81",1} where var"#s81"\<:PlotlyFrame; style) at C:\Users\LabSolver.julia\packages\PlotlyBase\NxSlF\src\PlotlyBase.jl:60 got unsupported keyword arguments “layout”, “size”  
Plot(::AbstractTrace, ::Any) at C:\Users\LabSolver.julia\packages\PlotlyBase\NxSlF\src\PlotlyBase.jl:65 got unsupported keyword arguments “layout”, “size”  
…  
Stacktrace:  
[1] plot(::PlotlyJS.SyncPlot, ::Vararg{PlotlyJS.SyncPlot,N} where N; options::Dict{Any,Any}, kwargs::Base.Iterators.Pairs{Symbol,Tuple{Int64,Int64},Tuple{Symbol,Symbol},NamedTuple{(:layout, :size),Tuple{Tuple{Int64,Int64},Tuple{Int64,Int64}}}}) at C:\Users\LabSolver.julia\packages\PlotlyJS\m2Lzd\src\display.jl:14

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [January 26, 2021, 2:30pm UTC](https://discourse.julialang.org/t/graphing-a-large-tiled-graph-with-plotlyjs/53979/6 "2021-01-26T14:30:13Z")

</div>

Try running `gr()` to change you backend to GR. As long as you don’t need the interactivity for this, that should work just fine.
