# 书稿出版主题：宋体、无网格、内向刻度、图例靠下。
# 宋体须由 ragg 设备取系统字体（见 knitr-ragg.R）；不要 showtext_auto()。
# axis.title.y = -90 只服务尚未改成竖排的旧图；
# 已改单图在 theme_tech 之后再加 theme_ylab_stack（见 ylab-stack.R）。
theme_tech <- ggplot2::theme(
  text = ggplot2::element_text(family = "simsun"),
  panel.background = ggplot2::element_blank(),
  panel.grid.major = ggplot2::element_blank(),
  panel.grid.minor = ggplot2::element_blank(),
  plot.background = ggplot2::element_blank(),
  axis.line.x.bottom = ggplot2::element_line(color = "black"),
  axis.line.y.left = ggplot2::element_line(color = "black"),
  # 刻度标线朝内
  axis.ticks.length = ggplot2::unit(-0.1, "cm"),
  axis.title.y = ggplot2::element_text(
    angle = -90,
    margin = ggplot2::margin(t = 0, r = 10, b = 0, l = 0)
  ),
  # facet_grid(..., switch = "y") 左侧条默认 angle = 90（自下而上）；出版社要求自上而下
  strip.text.y.left = ggplot2::element_text(angle = -90),
  axis.title.x = ggplot2::element_text(
    margin = ggplot2::margin(t = 10, r = 0, b = 0, l = 0)
  ),
  axis.text.x = ggplot2::element_text(
    family = "simsun",
    vjust = 0.1,
    margin = ggplot2::margin(t = 0.15, unit = "cm"),
    size = 11
  ),
  axis.text.y = ggplot2::element_text(
    family = "simsun",
    hjust = 0.95,
    size = 11,
    margin = ggplot2::margin(r = 0.1, unit = "cm")
  ),
  legend.position = "bottom",
  legend.margin = ggplot2::margin(t = -0.5, unit = "cm")
)
