Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import numpy as np
|
3 |
import matplotlib.pyplot as plt
|
4 |
-
import seaborn as sns
|
5 |
|
6 |
st.title('Plant Fractal')
|
7 |
|
@@ -39,7 +38,7 @@ if fractal_type == 'Strange Attractor':
|
|
39 |
x, y, z = generate_strange_attractor(num_points, a, b, c, d)
|
40 |
fig = plt.figure()
|
41 |
ax = fig.add_subplot(111, projection='3d')
|
42 |
-
|
43 |
ax.set_title('Strange Attractor Fractal')
|
44 |
ax.set_xlabel('X')
|
45 |
ax.set_ylabel('Y')
|
@@ -52,9 +51,9 @@ else:
|
|
52 |
x, y, z = generate_julia_set(num_points, c)
|
53 |
fig = plt.figure()
|
54 |
ax = fig.add_subplot(111, projection='3d')
|
55 |
-
|
56 |
ax.set_title('Julia Set Fractal')
|
57 |
ax.set_xlabel('X')
|
58 |
ax.set_ylabel('Y')
|
59 |
ax.set_zlabel('Z')
|
60 |
-
st.pyplot(fig)
|
|
|
1 |
import streamlit as st
|
2 |
import numpy as np
|
3 |
import matplotlib.pyplot as plt
|
|
|
4 |
|
5 |
st.title('Plant Fractal')
|
6 |
|
|
|
38 |
x, y, z = generate_strange_attractor(num_points, a, b, c, d)
|
39 |
fig = plt.figure()
|
40 |
ax = fig.add_subplot(111, projection='3d')
|
41 |
+
ax.plot(x, y, z, linewidth=1)
|
42 |
ax.set_title('Strange Attractor Fractal')
|
43 |
ax.set_xlabel('X')
|
44 |
ax.set_ylabel('Y')
|
|
|
51 |
x, y, z = generate_julia_set(num_points, c)
|
52 |
fig = plt.figure()
|
53 |
ax = fig.add_subplot(111, projection='3d')
|
54 |
+
ax.plot(x, y, z, linewidth=1)
|
55 |
ax.set_title('Julia Set Fractal')
|
56 |
ax.set_xlabel('X')
|
57 |
ax.set_ylabel('Y')
|
58 |
ax.set_zlabel('Z')
|
59 |
+
st.pyplot(fig)
|