You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if this is the wrong repo. I couldn't easily figure out where the group keyword is implemented.
DataFrame(a =repeat([0,1], 100), b =repeat([0, 1], 100)) |>@dfplot(ecdf(:a); group=:b)
Gives the following:
Since a and b are the same sequence of 0,1,0,1... the correct plot is one vertical line at x=0 for b=0 and one vertical line at x=1 for b=1.
My guess is that there is some unintended broadcasting of a scalar which prevents the above from erroring out since ecdf of :a returns a single ECDF struct with all the data. I suppose one would get the exact same issue for any other function which does returns a plottable object which is not a vector.
Perhaps the above can be made to work if the grouping happens before any function is applied, but throwing an error would also be fine I guess.
The text was updated successfully, but these errors were encountered:
IIRC the problem here (and with a few other oddities of ecdfplot) is that it's defined as a user plot and not a series type, which greatly limits how it can be used. I implemented a series type version https://github.com/arviz-devs/ArviZPlots.jl/blob/main/src/ecdfplot.jl that should probably replace this package's implementation.
Can confirm that the implementation of ecdfplot above works for the example above. I guess it is straight forward to generalize the recipes to also work for plot(::ECDF,..), right?
Sorry if this is the wrong repo. I couldn't easily figure out where the
group
keyword is implemented.Gives the following:
Since
a
andb
are the same sequence of 0,1,0,1... the correct plot is one vertical line at x=0 for b=0 and one vertical line at x=1 for b=1.My guess is that there is some unintended broadcasting of a scalar which prevents the above from erroring out since
ecdf
of:a
returns a singleECDF
struct with all the data. I suppose one would get the exact same issue for any other function which does returns a plottable object which is not a vector.Perhaps the above can be made to work if the grouping happens before any function is applied, but throwing an error would also be fine I guess.
The text was updated successfully, but these errors were encountered: