@@ -235,7 +235,7 @@ module LegendMakieLegendSpecFitsExt
235
235
xticks = (ceil (first (xlims)/ 10 )* 10 ): 10 : (floor (last (xlims)/ 10 )* 10 ),
236
236
ylims = nothing , row:: Int = 1 , col:: Int = 1 , xlabel = " Energy (keV)" ,
237
237
title:: AbstractString = " " , yscale = Makie. log10, show_residuals:: Bool = true ,
238
- watermark:: Bool = true , final:: Bool = true , kwargs...
238
+ sf_in_title :: Bool = true , watermark:: Bool = true , final:: Bool = true , kwargs...
239
239
)
240
240
241
241
fig = Makie. current_figure ()
@@ -252,9 +252,8 @@ module LegendMakieLegendSpecFitsExt
252
252
ylims = (ylim_min, ylim_max)
253
253
end
254
254
255
- ax = Makie. Axis (g[1 ,1 ], yticks = (exp10 .(0 : 10 ), " 1" .* join .(fill .(" 0" , 0 : 10 ))),
256
- ylabel = " Counts / $(round (step (first (report. survived. h. edges)), digits= 2 )) keV" ,
257
- limits = (xlims, ylims); yscale, xlabel, title, xticks)
255
+ ax = Makie. Axis (g[1 ,1 ], ylabel = " Counts / $(round (step (first (report. survived. h. edges)), digits= 2 )) keV" ,
256
+ limits = (xlims, ylims); yscale, xlabel, title = sf_in_title ? " $title Survival fraction: $(round (report. sf * 100 , digits = 2 )) %" : title, xticks)
258
257
259
258
before_data = Makie. plot! (ax, report. survived. h, color = (:gray , 0.5 ), fillto = 0.5 )
260
259
before_fit = Makie. lines! (ax, range (xlims... , length = 1000 ), x -> report. survived. f_fit (x) * step (first (report. survived. h. edges)), color = :black )
0 commit comments