Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Data Science Basics Charts and Tables Tables

Bar Chart and Table overlap...how can I insert a blank line in the figure

In the code in this exercise, the Bar Chart and Table overlap...how can I insert a blank line(s) in the figure?

Code:

def create_table(data_sample, price_groups, brand_names, columns, exported_figure_filename): tup = build_table_text(data_sample, brand_names) fig = plt.figure() ax = fig.add_subplot(1, 1, 1)

for group in price_groups:
    plt.bar(group, price_groups[group])         


if tup[0] and tup[1]:
    ax.table(cellText=tup[0], colLabels=columns, rowLabels=tup[1], loc='bottom')
    ax.text(-1.3, 0, 'Discounted Ties Brands', size=12, horizontalalignment='left', verticalalignment='top')
    ax.tick_params(
        axis='x',          # changes apply to the x-axis
        which='both',      # both major and minor ticks are affected
        labelbottom='off') # labels along the bottom edge are off

fig.savefig(exported_figure_filename, dpi=400, bbox_inches='tight')