Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ndata_columns = 6 if Plot.background else 4
ncomponents = content.shape[1] - ndata_columns
if data[0] is None:
data[0] = content[:,0:ndata_columns]
model_contributions = []
for component in range(ncomponents):
y = content[:, ndata_columns + component]
kwargs = dict(drawstyle='steps', alpha=0.1, color='k')
kwargs.update(plot_args[component])
label = component_names[component]
# we only label the first time we enter here
# otherwise we get lots of entries in the legend
component_names[component] = ''
if component >= len(bands):
bands.append(PredictionBand(xmid,
shadeargs=dict(color=kwargs['color']),
lineargs=dict(color=kwargs['color'])))
if label != 'ignore':
#plt.plot(xmid, y, label=label, **kwargs)
bands[component].add(y)
model_contributions.append(y)
models.append(model_contributions)
def plot_unconvolved_components(content):
xmid = content[:,0]
ncomponents = content.shape[1] - 2
for component in range(ncomponents):
y = content[:, 2 + component]
kwargs = dict(drawstyle='steps', alpha=0.1, color='k')
kwargs.update(plot_args[component])
label = component_names[component]
# we only label the first time we enter here
# otherwise we get lots of entries in the legend
component_names[component] = ''
if component >= len(bands):
bands.append(PredictionBand(xmid,
shadeargs=dict(color=kwargs['color']),
lineargs=dict(color=kwargs['color'])))
if label != 'ignore':
#plt.plot(xmid, y, label=label, **kwargs)
bands[component].add(y)