This is an edited verison of Dr. Wang's "myfirst_jupyternotebook" blog post (https://yongmeiwang.github.io/2021/12/21/myfirst_jupyternotebook.html) to demonstrate Jupyter Notebook datafile import and editing.
The following changes were made:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
from cycler import cycler
data = pd.read_csv("./datafile/Au_15nm_20nm_MieNF_JC.csv")
print(data)
Wavelength (nm) 15nm Near-field 20nm Near-field Difference 0 300 2.279255 2.333296 0.054041 1 301 2.278743 2.332563 0.053820 2 302 2.278083 2.331566 0.053483 3 303 2.277580 2.330844 0.053263 4 304 2.277081 2.330126 0.053045 .. ... ... ... ... 596 896 2.824623 2.845540 0.020917 597 897 2.821784 2.842624 0.020840 598 898 2.818994 2.839757 0.020763 599 899 2.816524 2.837214 0.020690 600 900 2.813762 2.834376 0.020614 [601 rows x 4 columns]
fig, ax = plt.subplots()
ax.set_facecolor("black")
line1 = ax.plot(data["Wavelength (nm)"], data["15nm Near-field"], label="15nm AuNP", color="#00ff41")
line2 = ax.plot(data["Wavelength (nm)"], data["20nm Near-field"], label="20nm AuNP", color="#FE53BB")
line3 = ax.plot(data["Wavelength (nm)"], data["Difference"], label="Difference", color="#F5D300")
ax.legend(loc='upper right')
plt.title("Gold Nanoparticle Mei Scatter")
plt.xlabel("Wavelength (nm)")
plt.ylabel("Electromagnetic Nearfield Absorption")
mpl.rcParams["figure.dpi"] = 500