Description Usage Arguments Author(s) Examples
ZZWDoubleAxisBarPlusLinePlot
1 2  | ZZWDoubleAxisBarPlusLinePlot(raw_data, ylim_prim, ylim_sec, xlab = "x1",
  ylab_prim = "y1", ylab_sec = "y2", bar_fill = "dodgerblue")
 | 
raw_data | 
 data.frame. 1st column: numeric value of x axis; 2nd column: numeric value of prime y axis (left side); 3rd column: numeric value of second y axis (right side).  | 
ylim_prim | 
 the range of prime y axis  | 
ylim_sec | 
 the range of second y axis  | 
xlab | 
 the title of x axis, Default: 'x1'  | 
ylab_prim | 
 the title of prime y axis, Default: 'y1'  | 
ylab_sec | 
 the title of prime y axis, Default: 'y2'  | 
bar_fill | 
 the color of bar  | 
Zhiwei Zhou
1 2 3 4 5 6 7 8 9 10 11 12 13 14  | library(ggplot2)
raw_data <- tibble::tibble(
  Month = 1:12,
  Precip = c(49,36,47,41,53,65,81,89,90,84,73,55),
  Temp = c(-4,-4,0,5,11,15,16,15,11,6,1,-3)
)
ZZWDoubleAxisBarPlusLinePlot(raw_data = raw_data,
                             ylim_prim = c(0, 180),
                             ylim_sec = c(-4, 18),
                             xlab = "Month",
                             ylab_prim = "Precipitation",
                             ylab_sec = "Temperature") +
  scale_x_continuous("Month", breaks = 1:12)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.