Abubakari commited on
Commit
005fc47
1 Parent(s): e3e769d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -15
app.py CHANGED
@@ -85,7 +85,7 @@ cdf_values = F_BCNOLLN(y1, y2, mu1, sigma1, alpha1, beta1, mu2, sigma2, alpha2,
85
  #ax.set_xlabel('y1')
86
  #ax.set_ylabel('y2')
87
 
88
- st.subheader('PDF Plot')
89
 
90
  # Create a 3D contour plot with Plotly
91
  fig = go.Figure(data=[go.Surface(z=pdf_values, x=y1, y=y2, colorscale='Viridis')])
@@ -99,16 +99,19 @@ fig.update_layout(title='BCNOLLN PDF 3D Contour Plot', autosize=True,
99
  # Display the plot in Streamlit
100
  st.plotly_chart(fig)
101
 
102
- # Create a 2D contour plot for PDF
103
- fig_pdf = go.Figure(data=go.Contour(z=pdf_values, x=y1, y=y2, colorscale='Viridis'))
104
- fig_pdf.update_layout(title='BCNOLLN PDF 2D Contour Plot', autosize=True,
105
- xaxis_title='y1', yaxis_title='y2')
 
 
 
106
 
107
- # Display the PDF plot in Streamlit
108
- st.plotly_chart(fig_pdf)
109
 
110
 
111
- st.subheader('CDF Plot')
112
 
113
  # Create a 3D contour plot with Plotly
114
  fig = go.Figure(data=[go.Surface(z=cdf_values, x=y1, y=y2, colorscale='Viridis')])
@@ -122,13 +125,15 @@ fig.update_layout(title='BCNOLLN CDF 3D Contour Plot', autosize=True,
122
  # Display the plot in Streamlit
123
  st.plotly_chart(fig)
124
 
 
 
 
 
 
 
 
125
 
126
- # Create a 2D contour plot for CDF
127
- fig_cdf = go.Figure(data=go.Contour(z=cdf_values, x=y1, y=y2, colorscale='Viridis'))
128
- fig_cdf.update_layout(title='BCNOLLN CDF 2D Contour Plot', autosize=True,
129
- xaxis_title='y1', yaxis_title='y2')
130
-
131
- # Display the CDF plot in Streamlit
132
- st.plotly_chart(fig_cdf)
133
 
134
  #st.pyplot(fig)
 
85
  #ax.set_xlabel('y1')
86
  #ax.set_ylabel('y2')
87
 
88
+ st.subheader('Results for PDF Plot')
89
 
90
  # Create a 3D contour plot with Plotly
91
  fig = go.Figure(data=[go.Surface(z=pdf_values, x=y1, y=y2, colorscale='Viridis')])
 
99
  # Display the plot in Streamlit
100
  st.plotly_chart(fig)
101
 
102
+ # Create a 2D contour plot for PDF using Matplotlib
103
+ fig_2d, ax = plt.subplots()
104
+ cp = ax.contourf(y1, y2, pdf_values, cmap='viridis')
105
+ fig_2d.colorbar(cp)
106
+ ax.set_title('BCNOLLN PDF 2D Contour Plot')
107
+ ax.set_xlabel('y1')
108
+ ax.set_ylabel('y2')
109
 
110
+ # Display the PDF plot in Streamlit using Matplotlib
111
+ st.pyplot(fig_2d)
112
 
113
 
114
+ st.subheader('Results for CDF Plot')
115
 
116
  # Create a 3D contour plot with Plotly
117
  fig = go.Figure(data=[go.Surface(z=cdf_values, x=y1, y=y2, colorscale='Viridis')])
 
125
  # Display the plot in Streamlit
126
  st.plotly_chart(fig)
127
 
128
+ # Create a 2D contour plot for PDF using Matplotlib
129
+ fig_2d, ax = plt.subplots()
130
+ cp = ax.contourf(y1, y2, cdf_values, cmap='viridis')
131
+ fig_2d.colorbar(cp)
132
+ ax.set_title('BCNOLLN PDF 2D Contour Plot')
133
+ ax.set_xlabel('y1')
134
+ ax.set_ylabel('y2')
135
 
136
+ # Display the PDF plot in Streamlit using Matplotlib
137
+ st.pyplot(fig_2d)
 
 
 
 
 
138
 
139
  #st.pyplot(fig)