[Tutor] Issues Inserting Graphical Overlay Using Matplotlib Patches

Alan Gauld alan.gauld at yahoo.co.uk
Tue Sep 29 03:48:17 EDT 2020


On 29/09/2020 06:53, Stephen Malcolm wrote:

> I’ve studied those two lines, and I’m struggling to come up with a solution. 
> I think the word ‘data’ should be replaced with something else. 

Its not the word data that matters but that closing parenthesis ')'.
It should be a comma. That's what Python is telling you by saying
there is a syntax error. Its not a name error it is a mistake
in the grammar of your code.

>>> graph.scatter(data[:,0])data[:,1])
>>> graph.scatter(mean[0], mean[1])



-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list