GiovineItalia / Compose.jl

Declarative vector graphics
http://giovineitalia.github.io/Compose.jl/latest/
Other
248 stars 81 forks source link

Missing and NaN support #397

Closed Mattriks closed 4 years ago

Mattriks commented 4 years ago

This PR

Example

y = [0.26, 0.5, missing, 0.4, NaN, 0.48, 0.58, 0.83]
p1 = collect(Tuple, zip(1:8, y))
p2 = collect(Tuple, zip(1:9, vcat(NaN, y)))

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) # SVG and PNG look the same
draw(PNG(), p)

forms_and_nans

codecov-commenter commented 4 years ago

Codecov Report

Merging #397 into master will increase coverage by 0.17%. The diff coverage is 96.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
+ Coverage   44.07%   44.24%   +0.17%     
==========================================
  Files          18       18              
  Lines        3385     3390       +5     
==========================================
+ Hits         1492     1500       +8     
+ Misses       1893     1890       -3     
Impacted Files Coverage Δ
src/Compose.jl 31.39% <ø> (ø)
src/svg.jl 72.47% <96.15%> (+0.42%) :arrow_up:
src/measure.jl 51.44% <100.00%> (+1.44%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6777e8f...1f96ae3. Read the comment docs.