I was trying to create a forestplot using the following code:
# plot author on y axis # tE on x axis, # add whiskers function forestplot(df, author, tE, seTE, wt) wt = df.wt plot(df.tE, df.author, seriestype = :scatter, markershape = :rect, markersize = wt, xerr = df.seTE, legend = false) end forestplot(df, :author, :tE, :seTE, :wt)
the associated data here:
author = ["a", "b", "c", "d", "e"] tE = [1.23, 1.34, 1.45, 1.56, 1.67] seTE = [0.23, 0.24, 0.34, 0.56, 0.67] df = DataFrame(Dict( "author" => author, "tE" => tE, "seTE" => seTE)) df.wt = 1 ./ df.seTE .^2
The plot renders but issues the following warning
Warning: Indices Base.OneTo(5) of attribute `markersize` does not match data indices 2:15. └ @ Plots ~/mambaforge/share/julia/packages/Plots/nqFaB/src/utils.jl:141 ┌ Info: Data contains NaNs or missing values, and indices of `markersize` vector do not match data indices. │ If you intend elements of `markersize` to apply to individual NaN-separated segments in the data, │ pass each segment in a separate vector instead, and use a row vector for `markersize`. Legend entries │ may be suppressed by passing an empty label.
The data does not contain NaN, so I am not sure how to interpret this warning.
I’d greatly appreciate any insights and helpful pointers.