- Scales:
- scale_color_manual(values = c("color1", "color2", ...)):
Manually sets colors for points or lines.
- scale_fill_manual(values = c("color1", "color2", ...)):
Manually sets fill colors.
- scale_x_continuous(), scale_y_continuous():
Customize continuous scales for x and y axes.
- scale_x_discrete(), scale_y_discrete():
Customize discrete scales for x and y axes.
- scale_color_manual(values = c(“A” = “blue”, “B” = “red”)): Sets manual colors for points and lines.
• scale_shape_manual(values = c(15, 16, 17, 18, 19)): Sets manual shapes for points.
• scale_linetype_manual(values = c(“solid”, “dashed”, “dotted”, “dotdash”, “longdash”)): Sets manual linetypes for lines.
- Faceting:
- facet_wrap(~ variable): Creates multiple plots based on a single variable, arranged in a wrapping layout.
- facet_grid(rows ~ cols): Creates a grid of plots based on combinations of row and column variables.
- Legends:
- guides(): Customizes legend appearance (e.g., guides(fill = guide_legend(title = "Legend Title")))
- theme(legend.position = "none"): Removes the legend
- Coordinate Systems:
• coord_flip(): Flips the x and y axes.