ggplot function exports for interop
ggplotFunction
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| labs | 1 | Modify axis, legend, and plot labels Good labels are critical for making your plots accessible to a wider audience. |
03 Members
String, String, String, String, String, Object, Object, Object)Modify axis, legend, and plot labels
Good labels are critical for making your plots accessible to a wider audience. Always ensure the axis and legend labels display the full variable name. Use the plot title and subtitle to explain the main findings. It's common to use the caption to provide information about the data source. tag can be used for adding identification tags to differentiate between multiple plots.
You can also set axis and legend labels in the individual scales (using the first argument, the name). If you're changing other scale options, this is recommended.
If a plot already has a title, subtitle, caption, etc., And you want To remove it, you can Do so by setting the respective argument To NULL. For example, If plot p has a subtitle, Then p + labs(subtitle = NULL) will remove the subtitle from the plot.
| Name | Type | Description |
|---|---|---|
x | String | - |
y | String | - |
title | String | The text for the title. |
subtitle | String | The text For the subtitle For the plot which will be displayed below the title. |
caption | String | The text for the caption which will be displayed in the bottom-right of the plot by default. |
tag | Object | The text for the tag label which will be displayed at the top-left of the plot by default. |
alt | Object | Text used for the generation of alt-text for the plot. See get_alt_text for examples. |
alt_insight | Object | - |