p %>%
layout(
title = list(text = "<b>Frequency of Height</b>", x = 0.5, xanchor = "center"),
xaxis = list(title = "<b>Height (cm)</b>"),
yaxis = list(title = "<b>Frequency</b>"),
shapes = list(
list(
type = 'line', x0 = population_mean, x1 = population_mean,
y0 = 0, y1 = 1, yref = 'paper',
line = list(color = 'orange', width = 4, dash = 'dash')
),
list(
type = 'line', x0 = sample_mean_estimate, x1 = sample_mean_estimate,
y0 = 0, y1 = 1, yref = 'paper',
line = list(color = 'red', width = 4)
)
)
)