|
|
|
|
|
"""Quick test to verify the plot displays time labels correctly.""" |
|
|
|
|
|
import numpy as np |
|
|
from datetime import datetime, timedelta |
|
|
from app import plot_concentration_curve, simulate_protocol |
|
|
|
|
|
|
|
|
time, concentration, doses, dose_times, norm_pct = simulate_protocol( |
|
|
total_dose=70, |
|
|
num_doses=2, |
|
|
intervals=[6], |
|
|
percentages=[50, 50], |
|
|
start_time_str="07:00" |
|
|
) |
|
|
|
|
|
|
|
|
fig = plot_concentration_curve(time, concentration, start_time_str="07:00") |
|
|
|
|
|
|
|
|
fig.savefig('/tmp/test_plot.png', dpi=100, bbox_inches='tight') |
|
|
print("Plot created successfully!") |
|
|
print(f"Saved to /tmp/test_plot.png") |
|
|
print(f"Time labels should show: 07:00, 10:00 (+3), 13:00 (+6), etc.") |
|
|
|