Skip to content
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

Geom.polygon and Geom.ribbon update #1511

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

Mattriks
Copy link
Member

@Mattriks Mattriks commented Jan 11, 2021

  • I've updated the documentation to reflect these changes
  • I've added an entry to NEWS.md
  • I've added and/or updated the unit tests
  • I've run the regression tests
  • I've built the docs and confirmed these changes don't cause new errors

This PR:

  • Support one-length aesthetics for Geom.polygon and Geom.ribbon

Example

x, y = [1, 2, 3, 4, 5], [1.0, 2.0, NaN, 4.0, 5.0]
Dps = reduce(vcat, [DataFrame(x=[1, 5, 5, 1].+d, y=[14, 14, 10, 10].-d, id=d+1) for d in 0:9])

p1 = plot(x=x, y=y, ymin=y.-0.5, ymax=y.+0.5, Geom.line, Geom.point, linestyle=[:dash],
    layer(Geom.ribbon, alpha=[0.2], color=[colorant"gold"]), Theme(lowlight_color=identity)
)
p2 = plot(Dps, x=:x, y=:y, color=:id, alpha=[0.3], linestyle=[:dash],
    Geom.polygon(fill=true), Scale.color_discrete,
    Theme(line_width=2pt, lowlight_color=identity, discrete_highlight_color=identity)
)
hstack(p1, p2))

concretize01

Potential change:

  • The default for lowlight_color could be changed to Theme(lowlight_color=identity), in favor of doing alpha=[a].

Note Lowlight_color may still be useful in some situations (e.g. see Stat.smooth). I'd like feedback on this potential change.

@codecov-io
Copy link

codecov-io commented Jan 11, 2021

Codecov Report

Merging #1511 (be60590) into master (7144517) will decrease coverage by 0.02%.
The diff coverage is 98.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1511      +/-   ##
==========================================
- Coverage   89.72%   89.70%   -0.03%     
==========================================
  Files          39       39              
  Lines        4625     4613      -12     
==========================================
- Hits         4150     4138      -12     
  Misses        475      475              
Impacted Files Coverage Δ
src/geometry.jl 77.77% <ø> (ø)
src/theme.jl 71.23% <0.00%> (ø)
src/geom/polygon.jl 100.00% <100.00%> (ø)
src/geom/ribbon.jl 100.00% <100.00%> (ø)
src/misc.jl 64.59% <100.00%> (-3.39%) ⬇️

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 7144517...be60590. Read the comment docs.

@Mattriks Mattriks merged commit eef6074 into GiovineItalia:master Jan 15, 2021
@Mattriks Mattriks mentioned this pull request Feb 28, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants