Draw line chart
draw_line(
data,
x_var,
y_var,
group_var,
x_axis = NULL,
y_axis = NULL,
x_label = NULL,
y_label = NULL,
axis_label = c("Age (years)", "Age specific rate"),
cols = c("darkgreen", "darkred", "gray"),
line_type = "l",
lwd = 2,
main = NULL,
add = FALSE,
offset = 0.01,
...
)
draw_linechart(x, facet_var, grid, ...)
The input data frame.
The variable for the x-axis.
The variable for the y-axis.
The variable used to group the data for multiple lines.
Optional, the custom X-axis tick values. If not provided, the function generates them.
Optional, the custom Y-axis tick values. If not provided, the function generates them.
Optional, label for X-axis ticks.
Optional, label for Y-axis ticks.
Labels for the axis title, it should be character vector length 2.
Optional. The colors for the lines. If not provided, the function uses default colors.
1-character string giving the type of plot desired. The following values are possible, for details, see plot: "p" for points, "l" for lines, "b" for both points and lines, "c" for empty points joined by lines, "o" for overplotted points and lines, "s" and "S" for stair steps and "h" for histogram-like vertical lines. Finally, "n" does not produce any points or lines.
Line width.
Optional. The title of the plot.
Plots to be added.
Offset of the axis.
Parameters
The input data frame.
Facet var
Grid
Line chart.