# SCI Figure Hub — EIS Nyquist Plot (CC0-1.0) library(ggplot2) pal <- c("#E64B35", "#00A087", "#3C5488") w <- 2 * pi * 10^seq(5, -1, length.out = 100) randles <- function(rs, rct, cdl, sig, name) { zw <- sig * (1 - 1i) / sqrt(w) z <- rs + 1 / (1i * w * cdl + 1 / (rct + zw)) data.frame(Zr = Re(z), Zi = -Im(z), sample = name) } df <- rbind(randles(2.1, 14, 1.5e-5, 16, "Catalyst-A"), randles(2.8, 32, 1.2e-5, 22, "Catalyst-B"), randles(3.6, 58, 1e-5, 28, "Pristine")) p <- ggplot(df, aes(x = Zr, y = Zi, colour = sample)) + geom_path(linewidth = 0.65) + geom_point(size = 1.1) + coord_fixed(xlim = c(0, 120), ylim = c(0, 110)) + scale_colour_manual(values = pal, name = NULL) + labs(x = expression("Z' ("*Omega*")"), y = expression("-Z'' ("*Omega*")")) + theme_classic(base_size = 8) + theme(legend.position = "top") ggsave("eis_nyquist.pdf", p, width = 89, height = 78, units = "mm")