| plot_dual_axis | R Documentation |
Two series on a left and a right axis
plot_dual_axis(data, x, left, right, log_right = FALSE, title = NULL)
data |
Data frame with the three columns |
x |
Column for the horizontal axis, for example |
left |
Column for the left axis |
right |
Column for the right axis |
log_right |
Show |
title |
Plot title |
ggplot object
df <- data.frame(month = 1:24, rain = abs(sin(1:24 / 2)) * 300, searches = abs(sin(1:24 / 2)) * 80)
plot_dual_axis(df, "month", "rain", "searches")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.