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
ma = ["232th","233u","235u","238u","239pu","241pu"]
cols = [7,9,11]
title = ["Thermal","Fast","14 Mev"]
colors = {"Thermal":"black","Fast":"orange","14 Mev":"red"}
for nucid in ma:
i = 0
for col in cols:
fig = go.Figure()
df=pd.read_csv( nucid + "_cum.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)
df[df.columns[3]] = df[df.columns[3]].apply(str)
if not df.empty:
fig.add_trace(go.Scatter( x=df[df.columns[1]], y=df[df.columns[col]], mode="markers", name= title[i], text= (df[df.columns[2]] + (df[df.columns[3]])), marker_color=colors[title[i]]))
fig.update_layout(title= nucid + " " + title[i] + " Cumulative Fission Yields ", height=1000, xaxis_title="A", yaxis_title="Yield [%]")
fig.show()
i = i+1