DmitrMakeev commited on
Commit
5c8b62d
·
verified ·
1 Parent(s): f1dd885

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -371,22 +371,23 @@ def plot_ph_week():
371
  # График pH
372
  plt.subplot(2, 1, 1)
373
  plt.plot(dates, ph_values, linestyle='-', color='b')
374
- plt.title(f'График pH за {week_number}-ю неделю')
375
- plt.xlabel('Дата и день недели')
376
- plt.ylabel('Значение pH')
377
- plt.xticks(rotation=90, fontsize=8)
378
  plt.grid(True)
379
 
380
  # График EC
381
  plt.subplot(2, 1, 2)
382
  plt.plot(dates, ec_values, linestyle='-', color='g')
383
- plt.title(f'График EC за {week_number}-ю неделю')
384
- plt.xlabel('Дата и день недели')
385
- plt.ylabel('Значение EC')
386
- plt.xticks(rotation=90, fontsize=8)
387
  plt.grid(True)
388
 
389
- plt.gcf().subplots_adjust(bottom=0.4)
 
390
 
391
  # Сохраняем графики в буфер
392
  buffer = io.BytesIO()
@@ -428,6 +429,7 @@ def plot_ph_week():
428
 
429
 
430
 
 
431
  @app.route("/")
432
  def index():
433
  return flask.render_template('index.html')
 
371
  # График pH
372
  plt.subplot(2, 1, 1)
373
  plt.plot(dates, ph_values, linestyle='-', color='b')
374
+ plt.title(f'График pH за {week_number}-ю неделю', fontsize=14)
375
+ plt.xlabel('Дата и день недели', fontsize=12)
376
+ plt.ylabel('Значение pH', fontsize=12)
377
+ plt.xticks(rotation=90, fontsize=10)
378
  plt.grid(True)
379
 
380
  # График EC
381
  plt.subplot(2, 1, 2)
382
  plt.plot(dates, ec_values, linestyle='-', color='g')
383
+ plt.title(f'График EC за {week_number}-ю неделю', fontsize=14)
384
+ plt.xlabel('Дата и день недели', fontsize=12)
385
+ plt.ylabel('Значение EC', fontsize=12)
386
+ plt.xticks(rotation=90, fontsize=10)
387
  plt.grid(True)
388
 
389
+ # Увеличиваем расстояние между графиками
390
+ plt.subplots_adjust(hspace=0.6, bottom=0.3)
391
 
392
  # Сохраняем графики в буфер
393
  buffer = io.BytesIO()
 
429
 
430
 
431
 
432
+
433
  @app.route("/")
434
  def index():
435
  return flask.render_template('index.html')