JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.83k stars 353 forks source link

Subplots do not scale correctly when using plotlyjs() with Plots.jl #1869

Open holgerteichgraeber opened 5 years ago

holgerteichgraeber commented 5 years ago

Description The second subplot seems to scale correctly, but the first one scales through the whole figure. See attached image. This issue only occurs when using plotlyjs(). If that is replaced by plotly(), everything seems to work fine. Please also refer to previous discussion in issue in PlotlyJS , which concluded in that the issue is with Plots.jl.

Minimum working example:

using Plots
plotlyjs()
p1=plot(1:10,1:10)
p2=plot(10:20,10:20)
plot(p1,p2,layout=(2,1))

plotlyjs_subplot_mwe

Version info

Julia Version 1.0.2
Commit d789231e99 (2018-11-08 20:11 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, haswell)

Pkg status

  Status `~/.julia/environments/v1.0/Project.toml`
  [ad839575] Blink v0.9.0
  [336ed68f] CSV v0.4.3
  [e2554f3b] Clp v0.5.1
  [acd19e82] ClustAnalysis v0.1.0 [`../../dev/ClustAnalysis`]
  [fd0f8501] ClustForOpt_priv v0.0.0 [`~/.julia/dev/ClustForOpt_priv`]
  [aaaa29a8] Clustering v0.12.1
  [944b1d66] CodecZlib v0.5.1
  [a93c6f00] DataFrames v0.15.1
  [b4f34e82] Distances v0.7.3
  [5789e2e9] FileIO v1.0.4
  [2e9cd046] Gurobi v0.5.7
  [033835bb] JLD2 v0.1.2
  [4076af6c] JuMP v0.18.5
  [47be7bcc] ORCA v0.2.0
  [f0f68f2c] PlotlyJS v0.12.1
  [91a5bcdd] Plots v0.22.0
  [d330b81b] PyPlot v2.6.3
  [60ddc479] StatPlots v0.8.2
  [37e2e46d] LinearAlgebra 
  [10745b16] Statistics 
  [8dfed614] Test 
mkborregaard commented 5 years ago

Thanks for reporting. Yes, PlotlyJS does not yet work fully as a Plots backend on Julia-1, because of changes in the way PlotlyJS handles windows.