def plot_temporal_distance_pdf_horizontal(self, use_minutes=True,<EOL>color="<STR_LIT>",<EOL>ax=None,<EOL>duration_divider=<NUM_LIT>,<EOL>legend_font_size=None,<EOL>legend_loc=None):
from matplotlib import pyplot as plt<EOL>plt.rc('<STR_LIT:text>', usetex=True)<EOL>if ax is None:<EOL><INDENT>fig = plt.figure()<EOL>ax = fig.add_subplot(<NUM_LIT>)<EOL><DEDENT>temporal_distance_split_points_ordered, densities, delta_peaks = self._temporal_distance_pdf()<EOL>xs = []<EOL>for i, x in enumerate(temporal_distance_split_points_ordered):<EOL><INDENT>xs.append(x)<EOL>xs.append(x)<EOL><DEDENT>xs = numpy.array(xs)<EOL>ys = [<NUM_LIT:0>]<EOL>for y in densities:<EOL><INDENT>ys.append(y)<EOL>ys.append(y)<EOL><DEDENT>ys.append(<NUM_LIT:0>)<EOL>ys = numpy.array(ys)<EOL>xlabel = "<STR_LIT>"<EOL>ylabel = "<STR_LIT>"<EOL>if use_minutes:<EOL><INDENT>xs /= duration_divider<EOL>ys *= duration_divider<EOL>xlabel = "<STR_LIT>"<EOL>delta_peaks = {peak / <NUM_LIT>: mass for peak, mass in delta_peaks.items()}<EOL><DEDENT>if delta_peaks:<EOL><INDENT>peak_height = max(ys) * <NUM_LIT><EOL>max_x = max(xs)<EOL>min_x = min(xs)<EOL>now_max_x = max(xs) + <NUM_LIT> * (max_x - min_x)<EOL>now_min_x = min_x - <NUM_LIT:0.1> * (max_x - min_x)<EOL>text_x_offset = <NUM_LIT:0.1> * (now_max_x - max_x)<EOL>for loc, mass in delta_peaks.items():<EOL><INDENT>text = "<STR_LIT>" + ("<STR_LIT>" % (mass))<EOL>ax.plot([<NUM_LIT:0>, peak_height], [loc, loc], color=color, lw=<NUM_LIT:5>, label=text)<EOL><DEDENT><DEDENT>ax.plot(ys, xs, "<STR_LIT>")<EOL>if delta_peaks:<EOL><INDENT>tot_delta_peak_mass = sum(delta_peaks.values())<EOL>fill_label = "<STR_LIT>" % (<NUM_LIT:1>-tot_delta_peak_mass)<EOL><DEDENT>else:<EOL><INDENT>fill_label = None<EOL><DEDENT>ax.fill_betweenx(xs, ys, color=color, alpha=<NUM_LIT>, label=fill_label)<EOL>ax.set_ylabel(xlabel)<EOL>ax.set_xlabel(ylabel)<EOL>ax.set_xlim(left=<NUM_LIT:0>, right=max(ys) * <NUM_LIT>)<EOL>if delta_peaks:<EOL><INDENT>if legend_font_size is None:<EOL><INDENT>legend_font_size = <NUM_LIT:12><EOL><DEDENT>if legend_loc is None:<EOL><INDENT>legend_loc = "<STR_LIT>"<EOL><DEDENT>ax.legend(loc=legend_loc, prop={'<STR_LIT:size>': legend_font_size})<EOL><DEDENT>if True:<EOL><INDENT>line_tyles = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT:->"][::-<NUM_LIT:1>]<EOL>to_plot_funcs = [self.max_temporal_distance, self.mean_temporal_distance, self.min_temporal_distance]<EOL>xmin, xmax = ax.get_xlim()<EOL>for to_plot_func, ls in zip(to_plot_funcs, line_tyles):<EOL><INDENT>y = to_plot_func() / duration_divider<EOL>assert y < float('<STR_LIT>')<EOL>ax.plot([xmin, xmax*<NUM_LIT:10>], [y, y], color="<STR_LIT>", ls=ls, lw=<NUM_LIT:1>)<EOL><DEDENT><DEDENT>return ax.figure<EOL>
Plot the temporal distance probability density function.

Returns
-------
fig: matplotlib.Figure