倉庫指標
- Star
- (1,943 star)
- PR 合併指標
- (平均合併 3天 12小時) (30 天內合併 2 個 PR)
描述
Plots doesn't yet support missing, which it should, since it's in Base.
The current approach taken in StatPlots is to copy the inputs, replacing missing with NaN for Vector{<:Number} (while converting to Float64), "" for String input and Symbol() for Symbol input, then propagating that. It should be possible to do so for the x, y and z arguments here https://github.com/JuliaPlots/Plots.jl/blob/602dbdf1d260ef07daa2a2bdae558d82299e3d96/src/series.jl#L75-L88 , as we already copy the input. It's more tricky for everything passed as keyword arguments, but the question is how often they'd contain missing.
Personally I think a cleaner approach is to provide first-class missings support in wrapping internal calls in Plots that may return missing in skipmissing where relevant and just forward the missing-containing Vectors to the backend and leave it to them to handle them. That makes sense since missing is defined in Base, and as such a first-class Julia citizen. But it's more work and we don't know how well the backends handle them.
@piever @daschw @SimonDanisch @pfitzseb @jheinen