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

Iulia Maria Lungu
19,302 Pointsplt.xticks([1, 2, 3], ["Setosa", "Versicolor", "Virginica"]) does not change the ticks to the Species
Here, my entire notebook code:
import csv
import matplotlib.pyplot as plt
from itertools import groupby
input_file = 'iris.csv'
plt.figure(figsize=(7.5, 4.25))
plt.style.use('classic')
with open(input_file, 'r') as iris_data:
irises = list(csv.reader(iris_data))
irises.pop()
petal_lengths = []
for species, group in groupby(irises, lambda i : i[4]):
petal_lengths.append([float(irises[2]) for irises in group])
plt.axis([0,4,0,10])
plt.xticks([1, 2, 3], ["Setosa", "Versicolor", "Virginica"])
plt.title("Iris petal length")
plt.xlabel("Iris variety")
plt.boxplot(petal_lengths)
plt.show()
Sergio Andrés Herrera Velásquez
Data Analysis Techdegree Graduate 25,323 PointsSergio Andrés Herrera Velásquez
Data Analysis Techdegree Graduate 25,323 PointsI was rewatching the vide, and the difference I see-that may cause the issue is in this line
if you replace the irises in the last line of that loop, i.e petal_lengths.append(float(ipetal [2]) for petal in group)
if you make that small change, your code should work fine