Skip to content

Commit

Permalink
Merge pull request #85 from disberd/fix_3d_cat
Browse files Browse the repository at this point in the history
Fix 3d plot concatenation
  • Loading branch information
sglyon authored Sep 22, 2021
2 parents b706d00 + bee980c commit af53af3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/subplots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,14 @@ function _cat(rows::Tuple{Vararg{Int}}, ps::Plot...)
layout["yaxis$ix"] = merge(copied_plots[ix].layout["yaxis"], layout["yaxis$ix"])

if _is3d(copied_plots[ix])
# need to move (x|y)axis$ix into scene$ix here
# need to remove (x|y)axis$ix and move their domains into scene$ix here
xaxis = pop!(layout, "xaxis$(ix)")
yaxis = pop!(layout, "yaxis$(ix)")
layout["scene$ix"] = attr(
xaxis=pop!(layout, "xaxis$(ix)"),
yaxis=pop!(layout, "yaxis$(ix)")
domain = attr(
x = xaxis[:domain],
y = yaxis[:domain]
)
)
for trace in copied_plots[ix].data
trace["scene"] = "scene$ix"
Expand All @@ -111,7 +115,7 @@ function _cat(rows::Tuple{Vararg{Int}}, ps::Plot...)
for trace in copied_plots[ix].data
trace["xaxis"] = "x$ix"
trace["yaxis"] = "y$ix"
end
end
end

end
Expand Down

0 comments on commit af53af3

Please sign in to comment.