diff --git a/examples/analyze_excel_ui.py b/examples/analyze_excel_ui.py index 266c855..29ca2e3 100644 --- a/examples/analyze_excel_ui.py +++ b/examples/analyze_excel_ui.py @@ -105,14 +105,14 @@ # in the context of accessory matplotlib functions to modify the axes # limits and labels and to add a legend, among other things. - # Color each histogram according to its corresponding DAPG concentration. - # Use a perceptually uniform colormap (cividis), and transition among - # colors using a logarithmic normalization, which comports with the - # logarithmically spaced DAPG concentrations. - cmap = mpl.cm.get_cmap('cividis') - norm = mpl.colors.LogNorm(vmin=1e0, vmax=500) - colors = [cmap(norm(dapg_i)) if dapg_i > 0 else cmap(0.0) - for dapg_i in dapg] + # Color each histogram according to its DAPG concentration. Linearize the + # color transitions using a logarithmic normalization to match the + # logarithmic spacing of the DAPG concentrations. (Concentrations are also + # augmented slightly to move the 0.0 concentration into the log + # normalization range.) + cmap = mpl.cm.get_cmap('gray_r') + norm = mpl.colors.LogNorm(vmin=1e0, vmax=3500.) + colors = [cmap(norm(dapg_i+4.)) for dapg_i in dapg] plt.figure(figsize=(6,3.5)) FlowCal.plot.hist1d([samples[s_id] for s_id in sample_ids], diff --git a/examples/analyze_mef.py b/examples/analyze_mef.py index 0aba899..17ae9be 100644 --- a/examples/analyze_mef.py +++ b/examples/analyze_mef.py @@ -445,14 +445,14 @@ # in the context of accessory matplotlib functions to modify the axes # limits and labels and to add a legend, among other things. - # Color each histogram according to its corresponding DAPG concentration. - # Use a perceptually uniform colormap (cividis), and transition among - # colors using a logarithmic normalization, which comports with the - # logarithmically spaced DAPG concentrations. - cmap = mpl.cm.get_cmap('cividis') - norm = mpl.colors.LogNorm(vmin=1e0, vmax=500) - colors = [cmap(norm(dapg_i)) if dapg_i > 0 else cmap(0.0) - for dapg_i in dapg] + # Color each histogram according to its DAPG concentration. Linearize the + # color transitions using a logarithmic normalization to match the + # logarithmic spacing of the DAPG concentrations. (Concentrations are also + # augmented slightly to move the 0.0 concentration into the log + # normalization range.) + cmap = mpl.cm.get_cmap('gray_r') + norm = mpl.colors.LogNorm(vmin=1e0, vmax=3500.) + colors = [cmap(norm(dapg_i+4.)) for dapg_i in dapg] plt.figure(figsize=(6,3.5)) FlowCal.plot.hist1d(samples, diff --git a/examples/analyze_no_mef.py b/examples/analyze_no_mef.py index 7b2209e..eb3e167 100644 --- a/examples/analyze_no_mef.py +++ b/examples/analyze_no_mef.py @@ -183,14 +183,14 @@ # in the context of accessory matplotlib functions to modify the axes # limits and labels and to add a legend, among other things. - # Color each histogram according to its corresponding DAPG concentration. - # Use a perceptually uniform colormap (cividis), and transition among - # colors using a logarithmic normalization, which comports with the - # logarithmically spaced DAPG concentrations. - cmap = mpl.cm.get_cmap('cividis') - norm = mpl.colors.LogNorm(vmin=1e0, vmax=500) - colors = [cmap(norm(dapg_i)) if dapg_i > 0 else cmap(0.0) - for dapg_i in dapg] + # Color each histogram according to its DAPG concentration. Linearize the + # color transitions using a logarithmic normalization to match the + # logarithmic spacing of the DAPG concentrations. (Concentrations are also + # augmented slightly to move the 0.0 concentration into the log + # normalization range.) + cmap = mpl.cm.get_cmap('gray_r') + norm = mpl.colors.LogNorm(vmin=1e0, vmax=3500.) + colors = [cmap(norm(dapg_i+4.)) for dapg_i in dapg] plt.figure(figsize=(6,3.5)) FlowCal.plot.hist1d(samples,