def generate_scaling_plot(timing_data, title, ylabel, description, plot_file):
proc_counts = timing_data['<STR_LIT>']<EOL>if len(proc_counts) > <NUM_LIT:2>:<EOL><INDENT>plt.figure(figsize=(<NUM_LIT:10>, <NUM_LIT:8>), dpi=<NUM_LIT>)<EOL>plt.title(title)<EOL>plt.xlabel("<STR_LIT>")<EOL>plt.ylabel(ylabel)<EOL>for case, case_color in zip(['<STR_LIT>', '<STR_LIT>'], ['<STR_LIT>', '<STR_LIT>']):<EOL><INDENT>case_data = timing_data[case]<EOL>means = case_data['<STR_LIT>']<EOL>mins = case_data['<STR_LIT>']<EOL>maxs = case_data['<STR_LIT>']<EOL>plt.fill_between(proc_counts, mins, maxs, facecolor=case_color, alpha=<NUM_LIT:0.5>)<EOL>plt.plot(proc_counts, means, '<STR_LIT>', color=case_color, label=case)<EOL><DEDENT>plt.legend(loc='<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>plt.figure(figsize=(<NUM_LIT:5>, <NUM_LIT:3>))<EOL>plt.axis('<STR_LIT>')<EOL>plt.text(<NUM_LIT>, <NUM_LIT>, "<STR_LIT>")<EOL>plt.text(<NUM_LIT:0.0>, <NUM_LIT>, "<STR_LIT>")<EOL>plt.text(<NUM_LIT:0.0>, <NUM_LIT>, "<STR_LIT>")<EOL>plt.text(<NUM_LIT:0.0>, <NUM_LIT>, "<STR_LIT>")<EOL><DEDENT>if livvkit.publish:<EOL><INDENT>plt.savefig(os.path.splitext(plot_file)[<NUM_LIT:0>]+'<STR_LIT>', dpi=<NUM_LIT>)<EOL><DEDENT>plt.savefig(plot_file)<EOL>plt.close()<EOL>return elements.image(title, description, os.path.basename(plot_file))<EOL>
Generate a scaling plot.

Args:
    timing_data: data returned from a `*_scaling` method
    title: the title of the plot
    ylabel: the y-axis label of the plot
    description: a description of the plot
    plot_file: the file to write out to

Returns:
    an image element containing the plot file and metadata