-
Notifications
You must be signed in to change notification settings - Fork 251
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
Linestyle aes #1181
Linestyle aes #1181
Conversation
This is awesome. I think the biggest thing would be to have the corresponding legend info like in #1156. Would you prefer to have that in a separate PR? |
```@example | ||
using DataFrames, Gadfly, RDatasets | ||
using StatsBase: winsor | ||
set_default_plot_size(18cm, 8cm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! the only thing i notice is that all the other gallery examples use 21cm for multi-panel figures and 14cm for single.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll probably expand it to 21cm after I implement Guide.linekey
, since a linekey will appear for both plots. For now its 18cm to signify future growth!
Yes I'll do |
26a27af
to
180a833
Compare
Codecov Report
@@ Coverage Diff @@
## master #1181 +/- ##
==========================================
- Coverage 87.33% 87.17% -0.16%
==========================================
Files 34 34
Lines 4081 4048 -33
==========================================
- Hits 3564 3529 -35
- Misses 517 519 +2
Continue to review full report at Codecov.
|
I've also tested the strange case in #967 with this PR, and it works: # baddf.csv from #967
baddf = CSV.read("baddf.csv", allowmissing=:none)
pa = plot(baddf, x=:phi, y=:fhat, color=:i, Geom.line, Scale.color_discrete)
pb = plot(baddf, x=:phi, y=:fhat, group=:i, Geom.line)
hstack(pa,pb) So this PR is ready to merge and will also close #967. |
Also closes #755: p2 = plot([sin,cos],0,1, Scale.y_log10, Theme(key_position=:inside)) |
thanks for this! looks great. i'm going to go ahead and merge, but in future could you please squash your junk commits like the second one here? they just add noise when reading through the commit history, and make things more difficult to revert, cherry-pick, or bisect. |
@Mattriks have you had a chance to make the |
Not yet, that should go on the next roadmap, after #1385 (which I'm hoping to get back to soon) |
NEWS.md
squash
'ed orfixup
'ed junk commits with git-rebaseLinestyle aes
This PR adds:
linestyle
as an aesthetic (Feature request aes(linetype=variable)? #455), not just as a Theme field (Dashed Lines #392)Scale.linestyle_discrete
, so 1. & 2. are steps towardsGuide.linekey
(Legend with Shapes - Colorblind Accessibility #1042)render(geom::LineGeometry)
function which fixes Geom.line not drawn after NaNs in SVGs #903, and handles multiple aesthetics smoothly.Note that I'll do
Guide.linekey
in a separate PR.Examples: