-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use TidierPlots for some of the graphics #55
base: main
Are you sure you want to change the base?
Conversation
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 think this is looking good.
AoG is getting some love again (https://github.com/MakieOrg/AlgebraOfGraphics.jl/releases/tag/v0.7.0) but switching over to a plotting package that's closer to everybody's favorite R package is probably better for reaching a broader audience. (=I'm still onboard with swapping to TidierPlots for books and teaching.)
# draw( | ||
# data(gausshermitenorm(9)) * | ||
# mapping(:abscissae => "Positions", :weights); | ||
# figure=(; size=(600,450)), | ||
# ) |
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.
# draw( | |
# data(gausshermitenorm(9)) * | |
# mapping(:abscissae => "Positions", :weights); | |
# figure=(; size=(600,450)), | |
# ) |
# draw( | ||
# data(gausshermitenorm(9)) * mapping( | ||
# :abscissae => "Positions", | ||
# :weights => log2 => "log₂(weight)", | ||
# ); | ||
# figure=(; size=(600,450)), | ||
# ) |
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.
# draw( | |
# data(gausshermitenorm(9)) * mapping( | |
# :abscissae => "Positions", | |
# :weights => log2 => "log₂(weight)", | |
# ); | |
# figure=(; size=(600,450)), | |
# ) |
# draw( | ||
# data(@subset(dsm01pars, :type == "σ")) * | ||
# mapping( | ||
# :value => "Bootstrap samples of σ"; | ||
# color=(:group => "Group"), | ||
# ) * | ||
# AlgebraOfGraphics.density(); | ||
# figure=(; size=(600, 340)), | ||
# ) |
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.
# draw( | |
# data(@subset(dsm01pars, :type == "σ")) * | |
# mapping( | |
# :value => "Bootstrap samples of σ"; | |
# color=(:group => "Group"), | |
# ) * | |
# AlgebraOfGraphics.density(); | |
# figure=(; size=(600, 340)), | |
# ) |
# #| warning: false | ||
# let wlen = 1:21 | ||
# draw( | ||
# data((; wrdlen=wlen, count=counts(byitem.wrdlen, wlen))) * | ||
# mapping(:wrdlen => "Length of word", :count) * | ||
# visual(BarPlot); | ||
# figure=(; size=(600, 450)) | ||
# ) | ||
# end |
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.
# #| warning: false | |
# let wlen = 1:21 | |
# draw( | |
# data((; wrdlen=wlen, count=counts(byitem.wrdlen, wlen))) * | |
# mapping(:wrdlen => "Length of word", :count) * | |
# visual(BarPlot); | |
# figure=(; size=(600, 450)) | |
# ) | |
# end |
# draw( | ||
# data(pruned) * | ||
# mapping(:rt => "Response time (ms.) for correct responses") * | ||
# AlgebraOfGraphics.density(); | ||
# figure=(; size=(600, 340)), | ||
# ) |
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.
# draw( | |
# data(pruned) * | |
# mapping(:rt => "Response time (ms.) for correct responses") * | |
# AlgebraOfGraphics.density(); | |
# figure=(; size=(600, 340)), | |
# ) |
# draw( | ||
# data(pruned) * | ||
# mapping( | ||
# :rt => | ||
# ( | ||
# x -> 1000 / x | ||
# ) => "Response speed (s⁻¹) for correct responses", | ||
# ) * | ||
# AlgebraOfGraphics.density(); | ||
# figure=(; size=(600, 340)), | ||
# ) |
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.
# draw( | |
# data(pruned) * | |
# mapping( | |
# :rt => | |
# ( | |
# x -> 1000 / x | |
# ) => "Response speed (s⁻¹) for correct responses", | |
# ) * | |
# AlgebraOfGraphics.density(); | |
# figure=(; size=(600, 340)), | |
# ) |
# draw( | ||
# data(@subset(bxm03pars, :type == "ρ")) * | ||
# mapping( | ||
# :value => "Bootstrap replicates of correlation estimates"; | ||
# color=(:names => "Variables"), | ||
# ) * | ||
# AlgebraOfGraphics.density(); | ||
# figure=(; size=(600, 400)), | ||
# ) |
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.
# draw( | |
# data(@subset(bxm03pars, :type == "ρ")) * | |
# mapping( | |
# :value => "Bootstrap replicates of correlation estimates"; | |
# color=(:names => "Variables"), | |
# ) * | |
# AlgebraOfGraphics.density(); | |
# figure=(; size=(600, 400)), | |
# ) |
# draw( | ||
# data(@subset(pnm01pars, :type == "σ")) * | ||
# mapping( | ||
# :value => "Bootstrap samples of σ"; | ||
# color=(:group => "Group"), | ||
# ) * | ||
# AlgebraOfGraphics.density(); | ||
# figure=(; size=(600, 340)), | ||
# ) |
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.
# draw( | |
# data(@subset(pnm01pars, :type == "σ")) * | |
# mapping( | |
# :value => "Bootstrap samples of σ"; | |
# color=(:group => "Group"), | |
# ) * | |
# AlgebraOfGraphics.density(); | |
# figure=(; size=(600, 340)), | |
# ) |
# draw( | ||
# data(@subset(psm01pars, :type == "σ")) * | ||
# mapping( | ||
# :value => "Bootstrap samples of σ"; | ||
# color=(:group => "Group"), | ||
# ) * | ||
# AlgebraOfGraphics.density(); | ||
# figure=(; size=(600, 340)), | ||
# ) |
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.
# draw( | |
# data(@subset(psm01pars, :type == "σ")) * | |
# mapping( | |
# :value => "Bootstrap samples of σ"; | |
# color=(:group => "Group"), | |
# ) * | |
# AlgebraOfGraphics.density(); | |
# figure=(; size=(600, 340)), | |
# ) |
It appears that an earlier issue, TidierOrg/TidierPlots.jl#102, has resurfaced. I think we should delay merging this PR until that issue is resolved. It is probably also related to the mismatch of symbol color and line color is some of the plots in |
Can this be merged now? |
… into db/TidierPlots
It seems that AlgebraOfGraphics.jl is not being actively developed and I decided to take a look at TidierPlots.jl as a possible replacement. At present some of the facilities for comparative plots still need refinement. Faceting is broken after the switch to Makie as a back-end and vector
color/colour
arguments inaes
are often interpreted as if they were color specs instead of categorical vectors that determine the color of the geom.This branch provides a few plots with TidierPlots.jl for evaluation of whether this is a good path to follow.