stickchart | R Documentation |
Stick chart for discrete data
stickchart(
x,
freq = "a",
bg = TRUE,
main = NULL,
xlab = NULL,
ylab = NULL,
grids = grid(col = "white"),
bgcol = "gray",
bgborder = NA,
posx1 = 0,
posx2 = 0,
xang = 0,
labels = NULL,
lcol = "black",
pcol = lcol,
pty = 19,
pwd = 3,
lty = 1,
lwd = 2,
...
)
x |
R object (list) of class leem. Use |
freq |
Character argument. Type of frequency with options: |
bg |
Logical argument. Default is |
main |
Insert the plot title. The default is |
xlab |
Insert the title of the x-axis graphic label. The default is |
ylab |
Insert the title of the y-axis graphic label. The default is |
grids |
Insert grids to plot. The default is |
bgcol |
Insert the background color. This argument is only valid when |
bgborder |
Insert the background border color. This argument is only valid when |
posx1 |
Numeric argument.Distance of the labels (horizontal) in relation to the x axis. |
posx2 |
Numeric argument.Distance of the labels (vertical) in relation to the x axis. |
xang |
Numeric argument.Angle of the labels in relation to the x axis |
labels |
Character argument. Labels name vector. |
lcol |
Line color. The default is |
pcol |
Point color. The default is |
pty |
Point type. The default is |
pwd |
Point width. The default is |
lty |
Line type. The default is |
lwd |
Line width. The default is |
... |
further arguments passed to or from other methods. |
The result of stickchart()
is x
object.
library(leem)
# Example 1
rbinom(30, 10, 0.4) |>
new_leem() |>
tabfreq() |>
stickchart()
# Example 2
school <- rep(c("high", "university", "basic"), 3:5)
sample(school, 30, TRUE) |>
new_leem() |>
tabfreq(ordered = c("basic", "high", "university")) |>
stickchart(xang = 15, posx2 = -0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.