diff --git a/ezgui/src/widgets/scatter_plot.rs b/ezgui/src/widgets/scatter_plot.rs index f81f11db57..2b4e52f3c7 100644 --- a/ezgui/src/widgets/scatter_plot.rs +++ b/ezgui/src/widgets/scatter_plot.rs @@ -61,6 +61,11 @@ impl ScatterPlot { geom::Line::new(Pt2D::new(x, 0.0), Pt2D::new(x, height)).make_polygons(thickness), ); } + // Draw the diagonal, since we're comparing things on the same scale + batch.push( + Color::grey(0.5), + geom::Line::new(Pt2D::new(0.0, height), Pt2D::new(width, 0.0)).make_polygons(thickness), + ); let circle = Circle::new(Pt2D::new(0.0, 0.0), Distance::meters(4.0)).to_polygon(); for (b, a) in points { diff --git a/game/src/sandbox/dashboards/summaries.rs b/game/src/sandbox/dashboards/summaries.rs index bfb7ed0cfd..ab4493a089 100644 --- a/game/src/sandbox/dashboards/summaries.rs +++ b/game/src/sandbox/dashboards/summaries.rs @@ -224,12 +224,7 @@ fn contingency_table(ctx: &mut EventCtx, app: &App, filter_changes_pct: Option = std::iter::repeat((Duration::ZERO, 0)) .take(num_buckets) .collect(); - for (b, a) in app - .primary - .sim - .get_analytics() - .both_finished_trips(app.primary.sim.time(), app.prebaked()) - { + for (b, a) in points { let before_mins = b.num_minutes_rounded_up(); let raw_idx = endpts.iter().rev().position(|x| before_mins >= *x).unwrap(); let mut idx = endpts.len() - 1 - raw_idx; diff --git a/headless/src/main.rs b/headless/src/main.rs index 9861255c33..9698a3d245 100644 --- a/headless/src/main.rs +++ b/headless/src/main.rs @@ -1,6 +1,6 @@ use abstutil::{CmdArgs, Timer}; use geom::Time; -use sim::{GetDrawAgents, Scenario, SimFlags}; +use sim::{GetDrawAgents, ScenarioGenerator, SimFlags}; fn main() { let mut args = CmdArgs::new(); @@ -20,10 +20,11 @@ fn main() { || sim_flags.load.starts_with(&abstutil::path_all_maps()) { let s = if let Some(n) = num_agents { - Scenario::scaled_run(&map, n) + ScenarioGenerator::scaled_run(n) } else { - Scenario::small_run(&map) - }; + ScenarioGenerator::small_run(&map) + } + .generate(&map, &mut rng, &mut timer); s.instantiate(&mut sim, &map, &mut rng, &mut timer); } timer.done();