-
Notifications
You must be signed in to change notification settings - Fork 11
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
multihyp dot plot significance legend is not showing properly (solution included) #56
Comments
Thanks for catching it @Vanessa104. While your solution works, it outputs the warning
We need to find a more 'radical' solution. |
What about |
The warning is because scale_color_manual is already defined in the hyp_dots() function (at line 111), so defining it again will give you a warning. If we replace the current line 111 with the new code, then there will be no warnings. I didn’t commit the change and created this issue instead, in case there is a better solution or in case there are other developments going on. |
When drawing dot plot Function hyp_dots() when used for a mylti_hyp object.
See the significance legend:
This is likely due to the newer version of the package
scales
. Unsure which version exactly, but it seems like internal function .reverselog_trans() which is based on scales::trans_new() is not working well.Solution:
https://github.com/montilab/hypeR/blob/master/R/hyp_dots.R
Line 111. Change this line to:
scale_color_continuous(high = "#114357", low = "#E53935", trans = scales::log10_trans(), guide = guide_colorbar(reverse = TRUE))
Or, add this after using hyp_dots() to overwrite the existing function.
hyp_dots(...) + scale_color_continuous(...insert above...)
Example output:
The text was updated successfully, but these errors were encountered: