---
title: "Hanlon2023_SupplementalFigure_1"
author: "Meredith Hanlon"
date: "2023-08-26"
output: html_document
---


```{r global_options, echo = FALSE}
knitr::opts_chunk$set(warning=FALSE, message=FALSE, echo=FALSE, error = TRUE)
```

```{r}
library(tidyverse)
library(rstatix)
library(ggpubr)
library(readxl)
library(stats)
library(viridis)
library(patchwork)
library(ggpmisc)
library(ggthemes)
library(ggrepel)
library(FactoMineR)
library(factoextra)
library(corrplot)
library(mclust)
library(broom)
library(RColorBrewer)
library(ggh4x)

stderror <- function(x) sd(x, na.rm = TRUE) / sqrt(length(na.omit(x)))

theme_mh <- function(){ 
    font <- "sans"   #assign font family up front
    theme(
      panel.grid.major = element_blank(),
      panel.grid.minor = element_blank(),
      panel.background = element_blank(),
      panel.border = element_rect(color = "black", fill = NA),
      axis.ticks = element_line(color = "black"),   
      axis.line = element_line(color = "black"),
      strip.background = element_blank(),
      legend.key = element_rect(fill = NA),
      text = element_text(family = font, size = 10, color = "black"),
      axis.text = element_text(family = font, size = 8, color = "black")
    )
}
```

```{r}
all_coresumm <- read_excel("Hanlon_2023_data.xlsx", sheet = "SFigure_1")
```


## d95

```{r plots2, fig.height = 5, fig.width = 7}
p1 <- ggplot(all_coresumm) +
  geom_boxplot(aes(x = Genotype, y = d95), outlier.shape = NA) +
  geom_jitter(aes(x = Genotype, y = d95, color = Location), position = position_dodge(width=0.75), size = 1.5) +
  facet_wrap(type~., ncol = 1, scales = "free_x") +
  theme_mh() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1),
        legend.position = "top") +
  scale_color_tableau("Tableau 10") +
  scale_shape_manual(values = c(16, 17, 18, 19))
p1

ggsave("Supplemental_Figure_xyz2.png", width = 7, height = 5, units = "in")
```


