-
Notifications
You must be signed in to change notification settings - Fork 62
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
Removal of Legend from TMB plot via theme causes plot to fail #368
Comments
appologies for the late response, with the original waterfall() plot, the number of items in the graphical objects must be the same for alignment purposes. I rebuilt the function to in part remedy this but it's not yet ready for use. If you're looking for a quick solution, you can remove the entire legend after the plot is created an example: library(grid)
tmp <- waterfall(brcaMAF, mutBurden = mutation_rate, mainRecurCutoff = 0.25, out="grob")
tmp$grobs[[3]] <- grid.rect(gp=gpar(col="white"))
grid.draw(tmp) |
Phenomenal. I'll try it tonight, and I look forward to your updated code!
We've been using it a fair bit for some visualizations, and being able to
suppress legends will be great for posters.
Zachary Rivers, PharmD
Oncology Pharmacist, Masonic Cancer Center, Fairview Pharmacy Services
PhD Candidate in Social and Administrative Pharmacy (SAPh)
College of Pharmacy, University of Minnesota at Twin Cities
7-168 Weaver-Densford Hall,
308 Harvard St. SE,
Minneapolis, MN 55455
E-mail: [email protected]
Cell: (802) 383-8073
…On Mon, Oct 28, 2019 at 12:27 PM Zachary Skidmore ***@***.***> wrote:
appologies for the late response,
with the original waterfall() plot, the number of items in the graphical
objects must be the same for alignment purposes. I rebuilt the function to
in part remedy this but it's not yet ready for use.
If you're looking for a quick solution, you can remove the entire legend
after the plot is created
an example:
library(grid)
tmp <- waterfall(brcaMAF, mutBurden = mutation_rate, mainRecurCutoff =
0.25, out="grob")
tmp$grobs[[3]] <- grid.rect(gp=gpar(col="white"))
grid.draw(tmp)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#368?email_source=notifications&email_token=AJRWM655USVSO4V54GTPEW3QQ4OJHA5CNFSM4JDX4PFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECNXEEY#issuecomment-547058195>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJRWM67CXNIZ5POSRCYD64LQQ4OJHANCNFSM4JDX4PFA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I pass a pre-counted TMB list to the waterfall plot function, it still assigns three colors in the legend, assigning synonymous, non-synonymous, and unidentified, while the entire graph is colored as unidentified.
When I use the mutBurdenLayer argument with an assigned theme of legend.position = "none", it returns an error:
Error in heatmap_grob[["grobs"]][[ind_legend]] :
attempt to select less than one element in get1index
and fails to render the rest of the plot.
Likewise, when I pass this code to the mainLayer, it also fails. Any thoughts?
The text was updated successfully, but these errors were encountered: