Interactive plots
Mouse over to see info about the points
Click on a label to include/exclude the line
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
colors = {"Thermal":"orange", "Fast":"green","14 Mev":"red"}
ma = ["232th","233u","235u","238u","239pu","241pu"]
cols = [4,6,8]
title = ["Thermal","Fast","14 Mev"]
for nucid in ma:
fig = go.Figure()
i = 0
for col in cols:
df=pd.read_csv( nucid + "_chain.txt")
df = df[pd.to_numeric(df[df.columns[col]],errors='coerce').notna()] # remove blanks (unknown intensities)
df[df.columns[col]] = df[df.columns[col]].astype(float)
fig.add_trace(go.Scatter( x=df[df.columns[3]], y=df[df.columns[col]], mode="lines+markers", name= title[i], marker_color=colors[title[i]]))
i = i+1
fig.update_layout(title= nucid + " Chain Fission Yields ", height=1000,xaxis_title="A", yaxis_title="Yield [%]")
fig.show()