-
Does anyone know how to adjust the distance between, for instance, the first bar in a barplot and the x- or y-axis? The example I have here is a horizontal, stacked barplot: Thank you!! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@WuSelina I think what you want is to set For example: library(BoutrosLab.plotting.general)
barplot.data <- data.frame(
samples = c(1L, 1L, 2L, 2L, 3L, 3L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L),
values = c(8, 2, 2, 1, 27, 2, 6, 2, 4, 3, 2, 0, 4, 2),
mutation = c("nonsynonymous", "other", "nonsynonymous",
"other", "nonsynonymous", "other", "nonsynonymous", "other",
"nonsynonymous", "other", "nonsynonymous", "other", "nonsynonymous",
"other")
)
create.barplot(
formula = samples ~ values,
data = barplot.data,
groups = mutation,
col = default.colours(2),
plot.horizontal = TRUE,
stack = TRUE,
ylimits = c(0.6, 7.4),
yat = barplot.data$samples
) Created on 2023-02-14 with reprex v2.0.2 |
Beta Was this translation helpful? Give feedback.
-
If anyone wants to recreate the duplicated reads QC plot, you can access it on the "Example BPG Plots" page. Don't forget about this helpful plotting resource too! |
Beta Was this translation helpful? Give feedback.
-
Just a note that the examples are internal, whereas this github repo is public. Can you create an issue so that we eventually port all examples and hall-of-fame plots over to here at some point?
From: Selina Wu ***@***.***>
Sent: Sunday, February 19, 2023 8:37 PM
To: uclahs-cds/public-R-BoutrosLab-plotting-general ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [uclahs-cds/public-R-BoutrosLab-plotting-general] How to adjust distance between bar and x- or y-axis in `create.barplot()`? (Discussion #92)
CAUTION - EXTERNAL EMAIL:Do not click links or open attachments unless you recognize the sender.
If anyone wants to recreate this QC plot, here it is on the "Example BPG Plots" page<https://confluence.mednet.ucla.edu/display/BOUTROSLAB/Example+BPG+Plots>. Don't forget about this helpful plotting resource too!
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/uclahs-cds/public-R-BoutrosLab-plotting-general/discussions/92*discussioncomment-5029624__;Iw!!F9wkZZsI-LA!FVBSxhvJ3V8k_K03GIC1xgA3mgFYEFbDgyQTjC3XtanqfOUlmwtx46DsLy8-9EjEvzz9AjPUKKosz2X-hnDgpFLDuN4MJEg$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AB3YOXVYBQXECRPEPTZWUNLWYLYIJANCNFSM6AAAAAAUW5QZWA__;!!F9wkZZsI-LA!FVBSxhvJ3V8k_K03GIC1xgA3mgFYEFbDgyQTjC3XtanqfOUlmwtx46DsLy8-9EjEvzz9AjPUKKosz2X-hnDgpFLDUu1gE4Q$>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
…________________________________
UCLA HEALTH SCIENCES IMPORTANT WARNING: This email (and any attachments) is only intended for the use of the person or entity to which it is addressed, and may contain information that is privileged and confidential. You, the recipient, are obligated to maintain it in a safe, secure and confidential manner. Unauthorized redisclosure or failure to maintain confidentiality may subject you to federal and state penalties. If you are not the intended recipient, please immediately notify us by return email, and delete this message from your computer.
|
Beta Was this translation helpful? Give feedback.
@WuSelina I think what you want is to set
ylimits
, orxlimits
if vertical.For example: