-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Objects of class stepfun are step functions with some information about left/right continuity at the jump points. A good example is the epdf function, the empirical probability density function of a sample.
When plotting such functions with base graphics, the plot shows the discontinuities as steps without vertical connecting segments, with dots indicating continuity, unless there are too many dots, in which case only the horizontal segments are plotted. Also, the default x-limits are obtained from the information provided by the object.
When such function is passed to gf_function, currently it is plotted as a "continuous approximation" of the step function, with very steep segments in place of the discontinuities. It would be nice if the extra information provided by the object was used by gf_function.
Compare
gf_function(ecdf(c(1, 3, 4, 7)), xlim = c(0, 8))
with
plot(ecdf(c(1, 3, 4, 7)))