Description Usage Arguments Value Examples
metricsgraphics baselines are horizontal lines that may specify, say, a goal or target to be reached. This function lets you add baselines to a plot object. you can add as many as you need to.
1 | mjs_add_baseline(mjs, y_value, label)
|
mjs |
metricsgraphics plot object |
y_value |
which y value to draw the baseline at |
label |
text label for the marker |
metricsgraphics object
1 2 3 4 5 6 7 8 | data.frame(
year=seq(1790, 1970, 10),
uspop=as.numeric(uspop)
) %>%
mjs_plot(x=year, y=uspop) %>%
mjs_line() %>%
mjs_add_marker(1850, "Something Wonderful") %>%
mjs_add_baseline(150, "Something Awful")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.