Bar plots of 1-way tables in grid.
grid_barplot(height, width = 0.8, offset = 0,
names = NULL, xlim = NULL, ylim = NULL, xlab = "", ylab = "", main = "",
gp = gpar(fill = "lightgray"), name = "grid_barplot",
newpage = TRUE, pop = FALSE, return_grob = FALSE)
either a vector or a 1-way table of frequencies.
width of the bars (recycled if needed to the number of bars).
offset of the bars (recycled if needed to the number of bars).
a vector of names for the bars, if set
to NULL
the names of height
are used.
limits for the x axis.
limits for the y axis.
a label for the x axis.
a label for the y axis.
a title for the plot.
a "gpar"
object controlling the grid graphical
parameters of the rectangles.
name of the plotting viewport.
logical. Should grid.newpage
be called
before plotting?
logical. Should the viewport created be popped?
logical. Shall the plot be returned as a grob object?
Achim Zeileis Achim.Zeileis@R-project.org
grid_barplot
mimics (some of) the features of barplot
,
but currently it only supports 1-way tables.
grid_barplot(sample(1:6), names = letters[1:6])
Run the code above in your browser using DataLab