Open nesteiner opened 1 year ago
When you define the plot, sp
, you should set the specs
, i.e. the type of trace for each subplot cell.
See also: https://github.com/sglyon/PlotlyBase.jl/blob/master/src/subplot_utils.jl#L155.
let nums = rand(1:10, 100)
cm = countmap(nums)
xs = collect(keys(cm))
ys = collect(values(cm))
df = DataFrame(xs = xs, ys = ys)
p = PlotlyJS.pie(df, values = :ys, textposition = "inside")
sp = make_subplots(rows = 1, cols = 2, specs =[Spec(kind="pie") for i=1:1, j in 1:2])
add_trace!(sp, p, row = 1, col = 1)
add_trace!(sp, p, row = 1, col = 2)
sp
end
oh, thank you, it's my fault
Describe the bug I have such code
what I expect is that there are two pie plots in the figure, however there is only one pie plot
Version info
Please provide the following:
versioninfo()
using Pkg; pkg"status"
(if you are on Julia 0.6 or earlier runPkg.status()
)