Sublime Limes' Line Graphs: SyntaxError not identified

During the Analyze Data With Python course, there is a project:

https://www.codecademy.com/paths/analyze-data-with-python/tracks/ida-5-data-visualization-matplotlib/modules/ida-5-1-introduction-to-matplotlib/projects/matplotlib-proj-i

# create your figure here

plt.figure(figsize=(12,8))

ax1 = plt.subplot(1,2,1)

x_values = range(len(months)

plt.plot(x_values,visits_per_month)

I’m in the step above and I just can’t uderstand why the platform returns a error of invalid syntaxe at this line: plt.figure(figsize=(12,8)).

What is wrong with the syntax???!!!

Is it python or the CC validator giving your the error?.. because that’s perfectly valid python syntax.

Might not be related but you seem to be missing a bracket on the line where you assign to x_values.

1 Like

Lol. I didn’t even look at that, but yea that’ll throw the error!! :sweat_smile: :sweat_smile: :sweat_smile: me and my horse blinders

I corrected that, but it keeps showing an error message.

As you can see it mentions line 16.
May this be a bug?

Did you import matplotlib.pyplot as plt?

1 Like

Yes, I did, but the problem just went away after I reset my network.

Thanks for your help!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.