saba000farahani commited on
Commit
63d3456
·
verified ·
1 Parent(s): d113a92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -113,20 +113,20 @@ def predict_and_plot(velocity, temperature, precipitation, humidity):
113
  cleaning_times = calculate_cleaning_time(time_intervals, simulated_contamination_levels)
114
 
115
  # Lidar names
116
- lidar_names = ['앞/왼쪽', '앞/오른쪽', '왼쪽', '오른쪽', '지붕', '']
117
 
118
  # Plot the graph
119
  fig, ax = plt.subplots(figsize=(12, 8))
120
 
121
  for i in range(simulated_contamination_levels.shape[1]):
122
  ax.plot(time_intervals, simulated_contamination_levels[:, i], label=f'{lidar_names[i]}')
123
- ax.axhline(y=0.4, color='r', linestyle='--', label='오염 임계값' if i == 0 else "")
124
  if i < len(cleaning_times):
125
  ax.scatter(cleaning_times[i], 0.4, color='k') # Mark the cleaning time point
126
 
127
- ax.set_title(' LiDAR에 대한 시간 경과에 따른 오염 수준')
128
- ax.set_xlabel('시간 ()')
129
- ax.set_ylabel('오염 수준')
130
  ax.legend()
131
  ax.grid(True)
132
 
 
113
  cleaning_times = calculate_cleaning_time(time_intervals, simulated_contamination_levels)
114
 
115
  # Lidar names
116
+ lidar_names = ['F/L', 'F/R', 'Left', 'Right', 'Roof', 'Rear']
117
 
118
  # Plot the graph
119
  fig, ax = plt.subplots(figsize=(12, 8))
120
 
121
  for i in range(simulated_contamination_levels.shape[1]):
122
  ax.plot(time_intervals, simulated_contamination_levels[:, i], label=f'{lidar_names[i]}')
123
+ ax.axhline(y=0.4, color='r', linestyle='--', label='Contamination Threshold' if i == 0 else "")
124
  if i < len(cleaning_times):
125
  ax.scatter(cleaning_times[i], 0.4, color='k') # Mark the cleaning time point
126
 
127
+ ax.set_title('Contamination Levels Over Time for Each Lidar')
128
+ ax.set_xlabel('Time (seconds)')
129
+ ax.set_ylabel('Contamination Level')
130
  ax.legend()
131
  ax.grid(True)
132