qdensity | R Documentation |
Draw and save a density plot.
qdensity(
vec,
also.pdf = FALSE,
save.obj = FALSE,
ext = MarkdownHelpers::ww.set.file.extension(default = "png", also_pdf = also.pdf),
xlab = FALSE,
plot = TRUE,
xlab.angle = 90,
plotname = FixPlotName(substitute(vec)),
subtitle = NULL,
suffix = NULL,
caption = suffix,
filename = NULL,
save = TRUE,
mdlink = MarkdownHelpers::unless.specified("b.mdlink", def = FALSE),
logX = FALSE,
logY = FALSE,
palette_use = c("RdBu", "Dark2", "Set2", "jco", "npg", "aaas", "lancet", "ucscgb",
"uchicago")[4],
hide.legend = TRUE,
max.names = 50,
grid = FALSE,
w = 5,
h = w,
...
)
vec |
The variable to plot. |
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). |
xlab |
X-axis label. Default: FALSE. |
plot |
Display the plot. |
xlab.angle |
Rotate X-axis labels by N degree. Default: 90 |
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 filename. Default is NULL. |
caption |
Optional text added to bottom right corner of the plot. Default = suffix |
filename |
Manually provided filename (optional). Default: parse from |
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". |
logX |
Make X axis log10-scale. |
logY |
Make Y axis log10-scale. |
palette_use |
GGpubr Color palette to use. |
hide.legend |
hide legend |
max.names |
The maximum number of names still to be shown on the axis. |
grid |
Character indicating the axis to add gridlines. Options are 'x', 'y', or 'xy'. Default is 'y'. |
w |
Width of the plot. |
h |
Height of the plot. |
... |
Pass any other parameter of the corresponding plotting function(most of them should work). |
weight <- rnorm(1000)
qdensity(weight)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.