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 Rendering

My answer looks correct to me, but your checker is marking it wrong.

Am I missing something?

render.py
from setup import *

data_from_csv = open_with_csv('data.csv')

cotton_ties = filter_col_by_string(data_from_csv, "material", "_cotton")
cotton_and_striped = filter_col_by_string(cotton_ties, "print", "_striped")

import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
plt.style.use('ggplot')
colors=plt.rcParams['axes.color_cycle']

ax.set_title('Cotton and Stripes')
ax.set_xlabel('Ties')
ax.set_ylabel('Price')

x = 1

for tie in cotton_and_striped[1:]:
    ax.bar(x, float(tie[2]) ) 
    x += 1

ax.set_title('FILL THIS IN')
ax.set_ylabel('FILL THIS IN')
ax.set_xlabel('FILL THIS IN')

plt.grid(True)
fig.savefig('s5q3.png')

2 Answers

Dan Johnson
Dan Johnson
40,533 Points

You still have the block of code with the placeholder values so all your labels are being reset.

# Drop this second block
ax.set_title('FILL THIS IN')
ax.set_ylabel('FILL THIS IN')
ax.set_xlabel('FILL THIS IN')

Sorry!

I didn't notice the place holder values...