-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improvements to plotting functions #10
Comments
Also, |
For |
You are using facet_grid for plotting mutliple effects? |
@pcarbo Yes I do use facet_grid for plotting mutliple effects. I have updated the repo have you suggested let me know if this looks good to you. |
@william-denault A made a few improvements to the effect plot, and now I call it "plot_susiF_effect" to make the function name consistent with the other plotting functions. A few notes:
plot_susiF_effect(fit,cred.band = FALSE,effect = "all")
# Error in rep(obj$outing_grid, indx_effect + 1) : invalid 'times' argument
plot_susiF_effect(fit,effect = 1:2)
plot_susiF_effect(fit,effect = 2:1) |
Also note that "color" is the correct aesthetic in ggplot2, not "col". |
I also made a few improvements to "plot_susiF_pip". (It was not an exported function, so I fixed that.) Can you please add roxygen2 docs for this function? Also, as before the additional arguments "..." seems to be unused? If so, I would remove it. |
Hi @pcarbo , I have added these improvement and your other suggestions. The argument You have a look at the example below `library(ashr) G = matrix(sample(c(0, 1,2), size=N*P, replace=TRUE), nrow=N, ncol=P) #Genotype for ( i in 1:N) } Y <- noisy.data out <- susiF(Y,X,L=3 , prior = 'mixture_normal_per_scale') |
@william-denault Thanks, the effect plot function is looking better now. I made a few additional improvements; see my comment above with the checkmarks. I also streamlined the roxygen2 docs by putting the documentation for all plotting functions into a single help page; this will simplify the documentation. I will keep this Issue open as I review the other plotting functions and continue to make improvements. |
I added an option to plot_susiF_effect() to show the affected region, which is TRUE by default. |
@william-denault I updated the plotting functions a bit more; please take a look at the new interface, which is illustrated in the new vignette. |
@william-denault Can you fix |
@william-denault I'd like to suggest a few changes to the plotting functions that I think would make the plotting interface more logical and easier to use. I believe that these changes should be straightforward to implement.
First, I suggest having three functions:
Also, please add a "plot" method which simply calls
plot_susiF
. See for exampleplot.ebnm
in the ebnm package for an example of how to do this.Second, the functions should not actually plot anything to the screen, but only return ggplot objects:
plot_susiF_pips
andplot_susiF_effects
should each return a single ggplot object.plot_susiF
should return a ggplot object or a list containing two ggplot objects. The output depends on an argument "which.plots" which looks like this (and will replace "pip_only"):Let me know if you have any questions about these suggested changes.
The text was updated successfully, but these errors were encountered: