| elements {rbokeh} | R Documentation |
Data for periodic table of the elements
elements
figure(title = "Periodic Table", data = elements,
xgrid = FALSE, ygrid = FALSE, xlab = "", ylab = "",
xlim = as.character(1:18), ylim = c(" ", " ", " ", as.character(7:1)),
height = 700, width = 1200) %>%
ly_crect(cat_offset(group, group_offset), period, 0.9, 0.9,
color = group_block, fill_alpha = 0.6, legend = FALSE,
hover = list(name, atomic_number, group_block, atomic_mass,
electronic_configuration)) %>%
ly_text(cat_offset(group, sym_offset), period, text = symbol,
font_style = "bold", font_size = "15pt",
align = "left", baseline = "middle") %>%
ly_text(cat_offset(group, sym_offset), cat_offset(period, 0.3), text = atomic_number_p,
font_size = "9pt", align = "left", baseline = "middle") %>%
ly_text(cat_offset(group, sym_offset), cat_offset(period, -0.2), text = name,
font_size = "6pt", align = "left", baseline = "middle") %>%
ly_text(cat_offset(group, sym_offset), cat_offset(period, -0.35), text = atomic_mass,
font_size = "6pt", align = "left", baseline = "middle") %>%
x_axis(axis = axis_spec(visible = FALSE)) %>%
y_axis(axis = axis_spec(visible = FALSE))