-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing values #384
Comments
seems reasonable. let's do it! |
I'll also work on fixing some other problems in Compose. The next example works for PNG, but for SVG the black line gets truncated, and the red line doesn't appear. x = 1:8
p1 = collect(Tuple, zip(x, [rand(2); NaN; 0.4; NaN; rand(3)]))
p2 = collect(Tuple, zip(x, [NaN; rand(7)]))
p = compose(context(units=UnitBox(0,0, 10, 1)),
(context(), rectangle(), fill(nothing), stroke("gray")),
(context(), line([p1]), stroke("black")),
(context(), line([p2]), stroke("red"))
)
draw(SVG(), p) # problems
draw(PNG(), p) # no problems |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently Compose does not handle the
Missing
type. But the basis of Compose isMeasure
units, so all numbers are converted toMeasure
units anyway, including NaNs (either natively supported by Compose's graphical backends or already handled in Compose).This means that there is a simple fix to supporting the
Missing
type in Compose:This fix would pave the way for supporting Missing values in Gadfly, because it means that Compose won't error when it comes to drawing the plot.
Comments? If none, I'll open a PR here sometime.
The text was updated successfully, but these errors were encountered: