emotion-recognition-neural-networks icon indicating copy to clipboard operation
emotion-recognition-neural-networks copied to clipboard

plot_emotion_matrix.py 'PolyCollection' has no attributes 'get_axes()'

Open MarkleJam opened this issue 6 years ago • 5 comments

Hi. When I run the plot_emotion_matrix.py, I find an error: AttributeError: 'PolyCollection' object has no attribute 'get_axes'. Below is the function concerning the error. I am wondering how to solve it def show_values(pc, fmt="%.2f", **kw): #from itertools import zip pc.update_scalarmappable() ax = pc.get_axes()

MarkleJam avatar Mar 27 '18 07:03 MarkleJam

ax = pc.get_axes() to ax = pc.axes

AdrienPlayerium avatar Mar 28 '18 09:03 AdrienPlayerium

@AdrienPlayerium Thanks a lot. It really works.

MarkleJam avatar Mar 29 '18 03:03 MarkleJam

Hi. When I run the plot_emotion_matrix.py, I find an error: File "plot_emotion_matrix.py", line 20, in for i in xrange(images.shape[0]): NameError: name 'xrange' is not defined

I am wondering how to solve it

snowalala avatar Jul 02 '18 05:07 snowalala

@snowalala if you are still looking, wild guess, but you are probably using python3, so just use range() instead of xrange()

KiwiTae avatar Jul 11 '18 00:07 KiwiTae

@KiwiTae Thanks a lot. It really works.

snowalala avatar Jul 13 '18 01:07 snowalala