File talk:Yeast oxygen production in various environments.svg
Jump to navigation
Jump to search
Generation of the chart[edit]
The chart was generated using a script.
# Author: Agastya agastya@wn-reporters.org # License: BSD-3-Clause # Description: Generation of this graph import pandas as pd import plotly.express as px import plotly.graph_objects as go file = r'h2data/Yeast_Oxygen_Readings.xlsx' data1 = pd.read_excel(file, sheet_name="H2_yeast") data2 = pd.read_excel(file, sheet_name="CO2_yeast") data3 = pd.read_excel(file, sheet_name="He_yeast") fig = go.Figure() fig.add_scatter(x=data1['Time (hours)'], y=data1['O2 partial pressure (microbars)'], mode='markers', marker=dict(size=6, color='rgba(160, 215, 211, 0.9)'), name='H2') fig.add_scatter(x=data2['Time (hours)'], y=data1['O2 partial pressure (microbars)'], mode='markers', marker=dict(size=6, color='rgba(119, 158, 204, 0.3)'), name='CO2') fig.add_scatter(x=data3['Time (hours)'], y=data1['O2 partial pressure (microbars)'], mode='markers', marker=dict(size=6, color='rgba(226, 108, 114, 0.1)'), name='He') fig.update_xaxes(title_text='Time Elapsed (Hr)') fig.update_yaxes(title_text='Oxygen partial pressure (microbars)') fig.update_xaxes(nticks=30) fig.update_yaxes(nticks=20) fig.update_layout(title_text="Yeast oxygen partial pressure in various environments.", width=850, height=500) fig.write_image("Yeast oxygen production in various environments.svg")