-
-
Notifications
You must be signed in to change notification settings - Fork 78
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 throw away shape information #138
Comments
Hi @ashleightrinh! yes this is possible. You can just add multiple traces to the plot. here's an example: plot([scatter(y=50 .* rand(10)), histogram(x=10 .* rand(1000))]) |
Thanks Spencer,
Though is there a way to plot just a vertical line (say, at the mean)? I
have tried plotting just a point using scatter but nothing appears.
…On 29 September 2017 at 15:16, Spencer Lyon ***@***.***> wrote:
Hi @ashleightrinh <https://github.com/ashleightrinh>!
yes this is possible.
You can just add multiple traces to the plot.
here's an example:
plot([scatter(y=50 .* rand(10)), histogram(x=10 .* rand(1000))])
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#138 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYCDWLCF2mOClZV450Ku2rIh56R5g_ywks5snPu_gaJpZM4Posw_>
.
|
Yep, check out the shapes docs: http://spencerlyon.com/PlotlyJS.jl/examples/shapes/ You are looking for using the |
below is a dirty sample
|
Thank you! I realised it does work just not when I am trying to put multiple plots next to each other. Here is the code I have
where
|
I think you are right. I don't currently have logic to combine the shapes from individual plot layouts into the final "subplotted" plot. You could try p1 = plot([data1], Layout(;shapes=shape1))
p2 = plot([data2], Layout(;shapes=shape2))
p3 = plot([data3], Layout(;shapes=shape3))
p = [p1 p2 p3]
relayout!(p, shapes=vcat(shape1, shape2, shape3)) But I'm worried that the locations of the shapes will not be correct... |
Looks like all issues here have been resolved except the subplots + shapes one, making this a dup of #100. Closing in favor of that issue. |
Is there a way to layer plots? So say I have a histogram, I want to be able to plot a line over it indicating the mean. Also maybe to have multiple histograms overlaid.
Thanks,
Ashleigh
The text was updated successfully, but these errors were encountered: