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.segment update #1465

Merged
merged 2 commits into from
Jul 23, 2020
Merged

Geom.segment update #1465

merged 2 commits into from
Jul 23, 2020

Conversation

Mattriks
Copy link
Member

@Mattriks Mattriks commented Jul 18, 2020

  • 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

Examples

a = range(0, stop=7π/4, length=8)+ 0.2*randn(8)
D2 = [DataFrame(x2=x, y2=x, x=x.+sin.(a)/r, y=x.+r*cos.(a), 
        ls=rand(["A","A","B"], 8)) for (x,r) in zip([1,-1], [0.4,0.3])]

p1 = plot(D2[1], x=[1], y=[1], xend=:x, yend=:y, Geom.segment, color=[colorant"forestgreen"], linestyle=[:dash])
p2 = plot(vcat(D2...),
    x=:x, y=:y, xend=:x2, yend=:y2, color=:x2, linestyle=:ls, Geom.point, Geom.segment, 
    Scale.linestyle_discrete(levels=["A","B"]), Scale.color_discrete,
    Theme(key_position=:none, point_size=3.5pt))
hstack(p1, p2)

geom_segment

@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2020

Codecov Report

Merging #1465 into master will increase coverage by 0.03%.
The diff coverage is 96.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1465      +/-   ##
==========================================
+ Coverage   89.41%   89.44%   +0.03%     
==========================================
  Files          39       39              
  Lines        4402     4416      +14     
==========================================
+ Hits         3936     3950      +14     
  Misses        466      466              
Impacted Files Coverage Δ
src/geom/segment.jl 96.00% <96.15%> (+1.40%) ⬆️
src/statistics.jl 96.45% <100.00%> (ø)
src/ticks.jl 90.71% <0.00%> (-0.66%) ⬇️
src/scale/scales.jl 91.95% <0.00%> (+1.14%) ⬆️

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 8984dfd...9dfc75a. Read the comment docs.

@bjarthur
Copy link
Member

the 1-length aesthetics here and in your other recent PRs is great! what about supporting scalars as well? that is, color=colorant"red". would make sense from the user POV i think, but easy to change the code?

@Mattriks
Copy link
Member Author

See #1430. Please add comments there about aesthetic syntax, so we can work out what's best.

@Mattriks Mattriks merged commit f759d9c into GiovineItalia:master Jul 23, 2020
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.

How to make lines with Julia using Gadfly (Facility location problem)?
3 participants