JuliaPlots / PlotlyJS.jl

Julia library for plotting with plotly.js
Other
418 stars 77 forks source link

Sub plotting broken #403

Closed jd-lara closed 3 years ago

jd-lara commented 3 years ago

It seems the older interface [plot1, plot2] to make subplots broke. I was going to make an MWE but in the docs is already showing the same issue I have

http://juliaplots.org/PlotlyJS.jl/dev/examples/subplots/

sglyon commented 3 years ago

Thank, you for opening this!

We did make some changes in https://github.com/sglyon/PlotlyBase.jl/commit/a6251e0a0e857c00ff619f5de8dcc1d56d0c7f59 (discussion in this issue: https://github.com/sglyon/PlotlyBase.jl/issues/31)

I didn't realize it would break [p1, p2]!

The syntax for a 1x2 array of subplots would now be [p1 p2]

To make it 2x1 you would do [p1; p2]

To make it 2x2 you could do

[p1 p2; p3 p4]

## OR

[p1 p2
 p3 p4]

While we lost the , version, for an Nx1 figure of subplots, the main benefit is that we can now construct arrays of plots in a manner more consistent with how the rest of Julia arrays work.

I will update the docs to try to fix this problem!

Please comment or re-open if you have additional questions or issues