Abubakari commited on
Commit
c2e6123
1 Parent(s): 20ce2de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -106,7 +106,7 @@ ax.clabel(contours, inline=True, fontsize=8, fmt='%.3f') # Add labels to the co
106
 
107
  ax.set_xlabel('y1')
108
  ax.set_ylabel('y2')
109
- ax.set_title('BCEOLLN Distribution Contour Plot')
110
 
111
  # Display the plot in Streamlit
112
  st.pyplot(fig)
@@ -137,16 +137,14 @@ fig.update_layout(title='BCNOLLN CDF 3D Contour Plot', autosize=True,
137
  # Display the plot in Streamlit
138
  st.plotly_chart(fig)
139
 
140
- # Create a 2D contour plot for PDF using Matplotlib
141
- fig_2d, ax = plt.subplots()
142
- cp = ax.contourf(y1, y2, cdf_values, cmap='viridis')
143
- fig_2d.colorbar(cp)
144
- ax.set_title('BCNOLLN PDF 2D Contour Plot')
145
  ax.set_xlabel('y1')
146
  ax.set_ylabel('y2')
147
-
148
- # Display the PDF plot in Streamlit using Matplotlib
149
- st.pyplot(fig_2d)
150
 
151
  # Create a 2D contour plot for PDF using Matplotlib
152
  fig_2d, ax = plt.subplots()
 
106
 
107
  ax.set_xlabel('y1')
108
  ax.set_ylabel('y2')
109
+ ax.set_title('BCEOLLN PDF Distribution Contour Plot')
110
 
111
  # Display the plot in Streamlit
112
  st.pyplot(fig)
 
137
  # Display the plot in Streamlit
138
  st.plotly_chart(fig)
139
 
140
+ # Create the contour plot
141
+ fig, ax = plt.subplots()
142
+ contours = ax.contour(y1, y2, cdf_values, levels=20)
143
+ ax.clabel(contours, inline=True, fontsize=8, fmt='%.3f') # Add labels to the contours
144
+
145
  ax.set_xlabel('y1')
146
  ax.set_ylabel('y2')
147
+ ax.set_title('BCEOLLN CDF Distribution Contour Plot')
 
 
148
 
149
  # Create a 2D contour plot for PDF using Matplotlib
150
  fig_2d, ax = plt.subplots()