qboxplot | R Documentation |
Draw and save a boxplot
qboxplot(
df_XYcol_or_list,
x = 1,
y = 2,
col = NULL,
fill = "gold",
plotname = FixPlotName(substitute(df_XYcol_or_list)),
subtitle = NULL,
suffix = NULL,
caption = suffix,
filename = NULL,
outlier.shape = NULL,
stat.test = TRUE,
stat.method = NULL,
stat.label.y.npc = "top",
stat.label.x = NULL,
palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb",
"uchicago")[4],
hide.legend = FALSE,
also.pdf = TRUE,
save.obj = FALSE,
ext = MarkdownHelpers::ww.set.file.extension(default = "png", also_pdf = also.pdf),
ylab = NULL,
logY = FALSE,
annotation_logticks_Y = logY,
xlab.angle = 90,
hline = FALSE,
vline = FALSE,
plot = TRUE,
save = TRUE,
mdlink = MarkdownHelpers::unless.specified("b.mdlink", def = FALSE),
grid = "y",
max.categ = 100,
add = NULL,
w = qqqAxisLength(df_XYcol_or_list),
h = 6,
...
)
df_XYcol_or_list |
Data, as 2 column data frame, where col.1 is X axis, alternatively a uniquely named list ov values. |
x |
The index or name of the column to be plotted on the X axis. Default: |
y |
The index or name of the column to be plotted on the Y axis. Default: |
col |
The index or name of the column to be used for coloring the plot. Default: |
fill |
Fill color of the plot. Default: |
plotname |
The title of the plot and the name of the file (unless specified in |
subtitle |
Optional subtitle text added below the title. Default is NULL. |
suffix |
Optional suffix added to the plotname. Default is NULL. |
caption |
Optional text added to bottom right corner of the plot. Default = suffix |
filename |
Manually provided filename (optional). Default: parse from |
outlier.shape |
outlier shape. NA to hide. |
stat.test |
Do a statistical test? |
stat.method |
stat method. NULL for default |
stat.label.y.npc |
stat label y position |
stat.label.x |
stat label x position |
palette_use |
GGpubr Color palette to use. |
hide.legend |
hide legend |
also.pdf |
Save plot in both png and pdf formats. |
save.obj |
Save the ggplot object to a file. Default: FALSE. |
ext |
File extension (.pdf / .png). |
ylab |
Y-axis label. Default: |
logY |
Make Y axis log10-scale. |
annotation_logticks_Y |
Logical indicating whether to add annotation logticks on Y-axis. Default follows the value of |
xlab.angle |
Rotate X-axis labels by N degree. Default: 90 |
hline |
Draw a horizontal line on the plot. |
vline |
Draw a vertical line on the plot. |
plot |
Display the plot. |
save |
Save the plot into a file. |
mdlink |
Insert a .pdf and a .png image link in the markdown report, set by "path_of_report". |
grid |
Character indicating the axis to add gridlines. Options are 'x', 'y', or 'xy'. Default is 'y'. |
max.categ |
The maximum allowed number of unique categories. |
add |
Add additional graphical elements to the plot. Default: NULL. |
w |
Width of the plot. |
h |
Height of the plot. |
... |
Pass any other parameter of the corresponding plotting function(most of them should work). |
data("ToothGrowth")
ToothLen.by.Dose <- ToothGrowth[, c("dose", "len")]
qboxplot(ToothLen.by.Dose)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.