d|>filter(expMode2=="Test")|>ggplot(aes(x =vb, y =dist,fill=condit))+stat_bar
Code
d|>filter(expMode2=="Test")|>ggplot(aes(x =condit, y =dist,fill=vb))+stat_bar+facet_wrap(~Exp)
Code
d|>filter(expMode2=="Test")|>ggplot(aes(x =condit, y =dist,fill=vb))+stat_bar+facet_wrap(fb~bandOrder)
Code
k1<-d|>filter(expMode2=="Test")|>group_by(condit, bandType, fb, bandOrder, vb)|># No need for 'id' if not used latersummarise(se_dist =sd(dist)/sqrt(n()),dist =mean(dist))ep1<-d|>filter(expMode2=="Test")|>group_by(condit, bandType, fb, bandOrder, vb)|># No need for 'id' if not used latersummarise(se_dist =sd(dist)/sqrt(n()),dist =mean(dist))|>ggplot(aes(x =condit, y =dist, fill =vb, pattern=bandType, pattern_density=0.35, pattern_fill=bandType, ppatern_angle=bandType,))+geom_bar_pattern(stat ="identity", # pattern_density=.25, position =position_dodge())+geom_errorbar(aes(ymin =dist-se_dist, ymax =dist+se_dist),position =position_dodge())+facet_wrap2(~fb*bandOrder,axes="all")+labs(title="Testing Deviation",pattern ="Band Type")+# scale_pattern_manual(values = c("stripe", "circle"))scale_pattern_spacing_discrete(range =c(0.01, 0.05))ep2<-d|>filter(expMode2=="Test")|>group_by(condit, bandType, fb, bandOrder, vb)|># No need for 'id' if not used latersummarise(se_dist =sd(dist)/sqrt(n()),dist =mean(dist))|>ggplot(aes(x =vb, y =dist, fill =condit, pattern=bandType))+geom_bar_pattern(stat ="identity", position =position_dodge())+geom_errorbar(aes(ymin =dist-se_dist, ymax =dist+se_dist),position =position_dodge())+facet_wrap2(~fb*bandOrder,axes="all")+labs(title="Testing Deviation",pattern ="Band Type")+scale_pattern_manual(values =c("stripe", "circle"))ep1/ep2
Warning: The `scale_name` argument of `discrete_scale()` is deprecated as of ggplot2
3.5.0.
Warning: The `scale_name` argument of `continuous_scale()` is deprecated as of ggplot2
3.5.0.
Warning: The `trans` argument of `continuous_scale()` is deprecated as of ggplot2 3.5.0.
ℹ Please use the `transform` argument instead.
Testing Vx
Code
ep1<-d|>filter(expMode2=="Test")|>group_by(condit, bandType, fb, bandOrder, vb)|># No need for 'id' if not used latersummarise(se_vx =sd(vx)/sqrt(n()),vx =mean(vx))|>ggplot(aes(x =condit, y =vx, fill =vb, pattern=bandType))+geom_bar_pattern(stat ="identity", position =position_dodge())+geom_errorbar(aes(ymin =vx-se_vx, ymax =vx+se_vx),position =position_dodge())+facet_wrap2(~fb*bandOrder,axes="all")+labs(title="Testing Vx",pattern ="Band Type")+scale_pattern_manual(values =c("stripe", "circle"))ep2<-d|>filter(expMode2=="Test")|>group_by(condit, bandType, fb, bandOrder, vb)|># No need for 'id' if not used latersummarise(se_vx =sd(vx)/sqrt(n()),vx =mean(vx))|>ggplot(aes(x =vb, y =vx, fill =condit, pattern=bandType))+geom_bar_pattern(stat ="identity", position =position_dodge())+geom_errorbar(aes(ymin =vx-se_vx, ymax =vx+se_vx),position =position_dodge())+facet_wrap2(~fb*bandOrder,axes="all")+labs(title="Testing Vx",pattern ="Band Type")+scale_pattern_manual(values =c("stripe", "circle"))ep1/ep2
test|>ggplot(aes(x=train_end,y=dist,fill=condit))+stat_summary(geom ="line", position=position_dodge(), fun =mean)+stat_summary(geom ="errorbar", position=position_dodge(.9), fun.data =mean_se, width =.4, alpha =.7)+facet_wrap(~vb)+labs(x="Band", y="Deviation From Target")
Warning: Width not defined
ℹ Set with `position_dodge(width = ...)`
Warning: `position_dodge()` requires non-overlapping x intervals.
`position_dodge()` requires non-overlapping x intervals.
`position_dodge()` requires non-overlapping x intervals.
`position_dodge()` requires non-overlapping x intervals.
`position_dodge()` requires non-overlapping x intervals.
`position_dodge()` requires non-overlapping x intervals.
Code
test|>filter(bandType=="Extrapolation")|>ggplot(aes(x=train_end,y=dist,fill=condit,col=condit))+#geom_point() +geom_smooth(method="loess")+facet_nested_wrap(~bandOrder+vb+fb)+labs(x="Band", y="Deviation From Target")
`geom_smooth()` using formula = 'y ~ x'
Code
test|>filter(bandType=="Extrapolation")|>ggplot(aes(x=train_end,y=dist,fill=condit,col=condit))+#geom_point() +geom_smooth()+facet_nested_wrap(~bandOrder+vb+fb)+labs(x="Band", y="Deviation From Target")
`geom_smooth()` using method = 'gam' and formula = 'y ~ s(x, bs = "cs")'
Code
test|>filter(bandType=="Extrapolation")|>ggplot(aes(x=train_end,y=dist,fill=condit,col=condit))+#geom_point() +geom_smooth(method="lm")+facet_nested_wrap(~bandOrder+vb)+labs(x="Band", y="Deviation From Target")
`geom_smooth()` using formula = 'y ~ x'
Code
# create quartiles for train_endtest|>group_by(condit,vb,fb,bandOrder)|>filter(bandType=="Extrapolation")|>mutate(train_end_q =ntile(train_end,4))|>ggplot(aes(x=train_end_q,y=dist,fill=condit))+stat_bar+ggh4x::facet_wrap2(bandOrder~vb~fb)+labs(x="quartile", y="Deviation From Target")