diff --git a/gstlal-inspiral/bin/gstlal_inspiral_workflow b/gstlal-inspiral/bin/gstlal_inspiral_workflow
index 9ff4fcd3db309ce0700c03d8c5dee5b29bb276c5..06354bfc7b50eb71cd4c600866fe88faca6331f5 100755
--- a/gstlal-inspiral/bin/gstlal_inspiral_workflow
+++ b/gstlal-inspiral/bin/gstlal_inspiral_workflow
@@ -90,7 +90,7 @@ if args.workflow in set(("full", "filter", "rerank")):
 
 		triggers, pdfs = dag.compute_far(triggers, pdfs)
 
-		dag.plot_horizon_distance(ref_psd)
+		dag.plot_horizon_distance(dist_stats)
 		dag.plot_summary(triggers, pdfs)
 		dag.plot_background(triggers, pdfs)
 		dag.plot_sensitivity(triggers)
@@ -126,7 +126,7 @@ elif args.workflow == "injection":
 
 	triggers, pdfs = dag.compute_far(triggers, pdfs)
 
-	dag.plot_horizon_distance(ref_psd)
+	dag.plot_horizon_distance(dist_stats)
 	dag.plot_summary(triggers, pdfs)
 	dag.plot_background(triggers, pdfs)
 	dag.plot_sensitivity(triggers)
diff --git a/gstlal-inspiral/python/dags/layers/inspiral.py b/gstlal-inspiral/python/dags/layers/inspiral.py
index 865a8d3d60296e203d9f4faf8e9bdb1fcafa8a38..c2465a658a71f3b36ed903e79831baf974c6f691 100644
--- a/gstlal-inspiral/python/dags/layers/inspiral.py
+++ b/gstlal-inspiral/python/dags/layers/inspiral.py
@@ -1062,19 +1062,17 @@ def plot_analytic_vt_layer(config, dag, trigger_cache, pdf_cache, lnlr_cdf_cache
 	dag.attach(inj_layer)
 
 
-def plot_horizon_distance_layer(config, dag, psd_cache):
+def plot_horizon_distance_layer(config, dag, marg_dist_stat_caches):
 	layer = Layer(
-		"gstlal_plot_psd_horizon",
+		"gstlal_inspiral_plot_rankingstats_horizon",
 		name="plot_horizon_distance",
 		requirements={"request_cpus": 1, "request_memory": 2000, **config.condor.submit},
 		transfer_files=config.condor.transfer_files,
 	)
 
-	plot_filename = datafind.T050017_filename(config.all_ifos, "HORIZON", config.span, ".png", path="plots")
-
 	layer += Node(
-		inputs = Argument("psds", psd_cache.files),
-		outputs = Option("output", plot_filename),
+		inputs = Argument("rankingstats", marg_dist_stat_caches.files),
+		outputs = Option("outdir", "plots"),
 	)
 
 	dag.attach(layer)