Merge branch 'update/d3plot' into 'master'

Update d3 plot units and title - missing from previous MRs

See merge request cara/cara!244
This commit is contained in:
Philip James Elson 2021-08-12 07:52:35 +00:00
commit fe04e201f1
3 changed files with 7 additions and 7 deletions

View file

@ -117,7 +117,7 @@ def plot(times, concentrations, model: models.ExposureModel):
ax.spines['top'].set_visible(False)
ax.set_xlabel('Time of day')
ax.set_ylabel('Mean concentration ($q/m^3$)')
ax.set_ylabel('Mean concentration ($virions/m^{3}$)')
ax.set_title('Mean concentration of virions')
ax.xaxis.set_major_formatter(matplotlib.dates.DateFormatter("%H:%M"))
@ -238,7 +238,7 @@ def comparison_plot(scenarios: typing.Dict[str, dict], sample_times: np.ndarray)
ax.xaxis.set_major_formatter(matplotlib.dates.DateFormatter("%H:%M"))
ax.set_xlabel('Time of day')
ax.set_ylabel('Mean concentration ($q/m^3$)')
ax.set_ylabel('Mean concentration ($virions/m^{3}$)')
ax.set_title('Mean concentration of virions')
return fig

View file

@ -30,7 +30,7 @@ function draw_concentration_plot(svg_id, times, concentrations, exposed_presence
.attr('height', margins.top)
.append('xhtml:body')
.style('text-align', 'center')
.html('Mean concentration of infectious quanta');
.html('Mean concentration of virions');
// Line representing the mean concentration.
var lineFunc = d3.line()
@ -74,7 +74,7 @@ function draw_concentration_plot(svg_id, times, concentrations, exposed_presence
.attr('text-anchor', 'middle')
.attr('x', (height + margins.bottom) / 2)
.attr('y', (height + margins.left) * 0.92)
.text('Mean concentration (q/m^3)');
.text('Mean concentration (virions/m³)');
// Area representing the presence of exposed person(s).
exposed_presence_intervals.forEach(b => {
@ -181,4 +181,4 @@ function draw_concentration_plot(svg_id, times, concentrations, exposed_presence
focus.select('#tooltip-time').text('x = ' + time_format(d.hour));
focus.select('#tooltip-concentration').text('y = ' + d.concentration.toFixed(2));
}
}
}

View file

@ -140,7 +140,7 @@ class ExposureModelResult(View):
ax.spines['top'].set_visible(False)
ax.set_xlabel('Time (hours)')
ax.set_ylabel('Concentration ($q/m^3$)')
ax.set_ylabel('Concentration ($virions/m^{3}$)')
ax.set_title('Concentration of virions')
else:
self.ax.ignore_existing_data_limits = True
@ -185,7 +185,7 @@ class ExposureComparissonResult(View):
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
ax.set_xlabel('Time (hours)')
ax.set_ylabel('Concentration ($q/m^3$)')
ax.set_ylabel('Concentration ($virions/m^{3}$)')
ax.set_title('Concentration of virions')
return ax