Skip to content

plot multiple lines according to size, shape, and alpha#1564

Open
bjarthur wants to merge 1 commit intoGiovineItalia:masterfrom
bjarthur:bja/sizeshapealpha
Open

plot multiple lines according to size, shape, and alpha#1564
bjarthur wants to merge 1 commit intoGiovineItalia:masterfrom
bjarthur:bja/sizeshapealpha

Conversation

@bjarthur
Copy link
Member

@bjarthur bjarthur commented Dec 31, 2021

see #1558 (comment)

plot(x=[1,2,3,1,2,3], y=[1,2,3,4,5,6], size=[1,1,1,2,2,2], Geom.line, Geom.point, Scale.size_discrete2(n->range(3pt, 8pt, length=n))) was:

Screen Shot 2021-12-31 at 10 50 29 AM

and is now:

Screen Shot 2021-12-31 at 10 50 41 AM

ditto for shape and alpha. so they now all act like color.

@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2021

Codecov Report

Merging #1564 (141c9f4) into master (9245b75) will increase coverage by 0.84%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1564      +/-   ##
==========================================
+ Coverage   88.91%   89.76%   +0.84%     
==========================================
  Files          39       39              
  Lines        4636     4698      +62     
==========================================
+ Hits         4122     4217      +95     
+ Misses        514      481      -33     
Impacted Files Coverage Δ
src/geom/line.jl 100.00% <100.00%> (ø)
src/varset.jl 97.82% <0.00%> (-2.18%) ⬇️
src/guide.jl 90.95% <0.00%> (+0.14%) ⬆️
src/misc.jl 65.64% <0.00%> (+0.61%) ⬆️
src/shapes.jl 100.00% <0.00%> (+0.78%) ⬆️
src/Gadfly.jl 76.62% <0.00%> (+0.98%) ⬆️
src/scale/scales.jl 93.40% <0.00%> (+1.09%) ⬆️
src/statistics.jl 95.60% <0.00%> (+1.15%) ⬆️
src/theme.jl 71.23% <0.00%> (+2.73%) ⬆️
src/geometry.jl 77.77% <0.00%> (+2.77%) ⬆️
... and 1 more

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 9245b75...141c9f4. Read the comment docs.

@Mattriks
Copy link
Member

Mattriks commented Jan 5, 2022

See my #1558 (comment). I'm unconvinced by this PR. Linewidth is currently controlled by Theme(line_width), and should be developed into an aesthetic. alpha should change the line opacity, but needs to implemented yet. (https://discourse.julialang.org/t/gadfly-how-to-change-width-and-opacity-of-lines-in-geom-density/37823/4). The underlying issue is strokeopacity in Compose.jl

@bjarthur
Copy link
Member Author

bjarthur commented Jan 5, 2022

it's common to plot two lines with different shaped points. is that even possible in gadfly now?

@bjarthur
Copy link
Member Author

bjarthur commented Jan 5, 2022

to answer my own question: yes, but one must use layers, which seems cumbersome.

@Mattriks
Copy link
Member

Mattriks commented Jan 5, 2022

See my example plot in #1558 (using the group aesthetic).

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.

3 participants