Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
holgerteichgraeber opened this issue Dec 11, 2018 · 5 comments
Closed

Comments

@holgerteichgraeber
Copy link

** 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.

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 
@cc7768
Copy link
Collaborator

cc7768 commented Dec 12, 2018

Does this produce what you're looking for?

using PlotlyJS

t1 = scatter(;x=1:10, y=1:10, mode="line")
t2 = scatter(;x=10:20, y=10:20, mode="line")

[plot(t1); plot(t2)]

@holgerteichgraeber
Copy link
Author

holgerteichgraeber commented Dec 12, 2018

Yes, it does. However, using Plots instead of PlotlyJS does not produce anymore:

using Plots
plotlyjs()
t1 = scatter(;x=1:10, y=1:10, mode="line")
t2 = scatter(;x=10:20, y=10:20, mode="line")

[plot(t1); plot(t2)]

@sglyon
Copy link
Member

sglyon commented Dec 12, 2018

Hi @holgerteichgraeber because it works when you use this package directly as noted by @cc7768, this is an issue that will need to be fixed in Plots.jl.

I'm going to close here and encourage you to open an issue over there

@sglyon sglyon closed this as completed Dec 12, 2018
@sglyon
Copy link
Member

sglyon commented Dec 12, 2018

Thank you by the way for providing the requested information when you opened the issue! 👏

@holgerteichgraeber
Copy link
Author

Thank you for looking into this, I'll open it over at Plots.jl 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants