JUNGU commited on
Commit
3901252
ยท
1 Parent(s): 374c0d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -22,23 +22,23 @@ if uploaded_file:
22
  df_resampled = df.resample(f'{time_frame_minutes}T', on='timestamp').mean()
23
 
24
  # RGB ๊ทธ๋ž˜ํ”„
25
- plt.figure(figsize=(15, 5))
26
- plt.plot(df_resampled['R'], label='R')
27
- plt.plot(df_resampled['G'], label='G')
28
- plt.plot(df_resampled['B'], label='B')
29
- plt.title('RGB Color Variation')
30
- plt.xlabel('Time')
31
- plt.ylabel('Value')
32
- plt.legend()
33
- st.pyplot()
34
 
35
  # HSV ๊ทธ๋ž˜ํ”„
36
- plt.figure(figsize=(15, 5))
37
- plt.plot(df_resampled['H'], label='H')
38
- plt.plot(df_resampled['S'], label='S')
39
- plt.plot(df_resampled['V'], label='V')
40
- plt.title('HSV Color Variation')
41
- plt.xlabel('Time')
42
- plt.ylabel('Value')
43
- plt.legend()
44
- st.pyplot()
 
22
  df_resampled = df.resample(f'{time_frame_minutes}T', on='timestamp').mean()
23
 
24
  # RGB ๊ทธ๋ž˜ํ”„
25
+ fig_rgb, ax_rgb = plt.subplots(figsize=(15, 5))
26
+ ax_rgb.plot(df_resampled['R'], label='R')
27
+ ax_rgb.plot(df_resampled['G'], label='G')
28
+ ax_rgb.plot(df_resampled['B'], label='B')
29
+ ax_rgb.set_title('RGB Color Variation')
30
+ ax_rgb.set_xlabel('Time')
31
+ ax_rgb.set_ylabel('Value')
32
+ ax_rgb.legend()
33
+ st.pyplot(fig_rgb)
34
 
35
  # HSV ๊ทธ๋ž˜ํ”„
36
+ fig_hsv, ax_hsv = plt.subplots(figsize=(15, 5))
37
+ ax_hsv.plot(df_resampled['H'], label='H')
38
+ ax_hsv.plot(df_resampled['S'], label='S')
39
+ ax_hsv.plot(df_resampled['V'], label='V')
40
+ ax_hsv.set_title('HSV Color Variation')
41
+ ax_hsv.set_xlabel('Time')
42
+ ax_hsv.set_ylabel('Value')
43
+ ax_hsv.legend()
44
+ st.pyplot(fig_hsv)