Spaces:
Sleeping
Sleeping
ce-dric
commited on
Commit
·
bfb3838
1
Parent(s):
ba13ba3
update legend show
Browse files
app.py
CHANGED
@@ -22,10 +22,13 @@ if len(uploaded_files) == 3:
|
|
22 |
scan_lines.append(scan_line)
|
23 |
|
24 |
plt.figure(figsize=(10, 6))
|
|
|
|
|
25 |
for i, (line, file) in enumerate(zip(scan_lines, uploaded_files)):
|
26 |
-
plt.plot(line, label=f'{file.name}')
|
|
|
27 |
plt.xlabel('Pixel Position')
|
28 |
plt.ylabel('Pixel Value')
|
29 |
plt.title('Comparison of Scan Lines Across Images')
|
30 |
-
plt.legend(loc='upper
|
31 |
st.pyplot(plt)
|
|
|
22 |
scan_lines.append(scan_line)
|
23 |
|
24 |
plt.figure(figsize=(10, 6))
|
25 |
+
line_styles = ['-', '--', '-.']
|
26 |
+
colors = ['b', 'g', 'r']
|
27 |
for i, (line, file) in enumerate(zip(scan_lines, uploaded_files)):
|
28 |
+
plt.plot(line, label=f'{file.name}', linestyle=line_styles[i % len(line_styles)], color=colors[i % len(colors)], alpha=0.7, linewidth=1.5)
|
29 |
+
|
30 |
plt.xlabel('Pixel Position')
|
31 |
plt.ylabel('Pixel Value')
|
32 |
plt.title('Comparison of Scan Lines Across Images')
|
33 |
+
plt.legend(loc='upper left')
|
34 |
st.pyplot(plt)
|