ibecav / CGPfunctions

Powell Miscellaneous Functions for Teaching and Learning Statistics
Other
27 stars 11 forks source link

CGPfunctions #26

Closed nzechrist closed 4 years ago

nzechrist commented 4 years ago

Thank you for making CPGfunctions available.

I found it very useful. I have 2 questions:

  1. How can I increase the axis font size in Plot2wayANOVA? 2.Can the error bar be changed to standard deviation or standard error (presently the error bar uses the lower and upper confidence level)?
ibecav commented 4 years ago

Self- note theme(axis.text.x = element_text(angle = 90, hjust = 1, size=13, color="darkred"), axis.text.y = element_text(angle = 45, hjust = 0, size=12, color="purple"))

ibecav commented 4 years ago

Rather than try to cover all the possible ways users will want to modify a plot, I added ggplot.component = which allows you for example to make the x-axis labels larger and dark red with this ... ggplot.component = theme(axis.text.x = element_text(size=13, color="darkred"))

ibecav commented 4 years ago

Added an option called errorbar.display the default is confidence intervals but SD and SEM are now options.

ibecav commented 4 years ago

While I was at it I added ggtheme = ggplot2::theme_bw() which allows you to use one of the many other ggplot2 or hrbrthemes::theme_ipsum() for example

nzechrist commented 4 years ago

Great! Thank you so much for your time. Do I have to reinstall before all these changes would be applied or I should just go ahead and apply on the previously installed package?

ibecav commented 4 years ago

You should be able to grab the lastest from github now and install from there. Will take some time before I get it to CRAN

ibecav commented 4 years ago

devtools::install_github("ibecav/CGPfunctions", build_vignettes = TRUE)

nzechrist commented 4 years ago

You should be able to grab the lastest from github now and install from there. Will take some time before I get it to CRAN

I see. I will do that

nzechrist commented 4 years ago

I have installed the updated version following your directions and my two questions have been resolved. Thank you so much.

nzechrist commented 4 years ago

I tried using the ggplot.component to change the linetype (based on a grouping variable, Feed) using the code below:

ggplot.component = geom_line(aes(linetype=Feed)

I got this error message: Can't add 'geom_line(aes(linetype =Feed))' to a theme object

ibecav commented 4 years ago

You're welcome. Yes you can't really use ggplot.component to add geoms or change geoms. What is it you're trying to do? Vary the linetype as well as the colors for the plotted lines?

nzechrist commented 4 years ago

For instance if I print the plot in back and white, I am unable to differentiate the groups because the lines are solid for the entire group. That also applies for the points. I want to be able to vary the linetype to match one of the factors. For example, If I have a factor with two levels, I want to use solid line for level 1 and broken lines for level 2.

ibecav commented 4 years ago

Okay please add it as a request and I'll get to it when I can

ibecav commented 4 years ago

I see you did. Thank you. I almost never print these days and therefore seldom have to endure black & white but I get it. I’ll get to as soon as I can.

Sent from my mobile please forgive my brevity

On Jun 21, 2020, at 18:29, nzechrist notifications@github.com wrote:

 For instance if I print the plot in back and white, I am unable to differentiate the groups because the lines are solid for the entire group. That also applies for the points. I want to be able to vary the linetype to match one of the factors. For example, If I have a factor with two levels, I want to use solid line for level 1 and broken lines for level 2.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.