Data Analysis Project: Medical Data Visualizer (Heat Map Values Test)

Having trouble with the Heat Map Values test and wondering if I’m missing something when I generate the heatmap from seaborn.

Repl.it code here.

The expected value on the test requires three empty strings in the actual variable, my results are missing those three empty strings.

I’ve been testing the output of the plots in Jupyter Lab and when I run self.ax.get_default_bbox_extra_artists() as an excerpt from line 45 of test_module.py I can see the list with what appears to be three items which should be supplying the empty strings per the test.

Raw output of self.ax.get_default_bbox_extra_artists():

[<matplotlib.collections.QuadMesh at 0x2c3f15c8>,
 Text(0.5, 1.5, '0.0'),
 Text(0.5, 2.5, '0.0'),
 Text(1.5, 2.5, '-0.0'),
 Text(0.5, 3.5, '0.0'),
 Text(1.5, 3.5, '-0.1'),
 Text(2.5, 3.5, '0.5'),
 Text(0.5, 4.5, '0.0'),
 Text(1.5, 4.5, '0.1'),
 Text(2.5, 4.5, '0.1'),
 Text(3.5, 4.5, '0.3'),
 Text(0.5, 5.5, '0.0'),
 Text(1.5, 5.5, '0.0'),
 Text(2.5, 5.5, '0.0'),
 Text(3.5, 5.5, '0.0'),
 Text(4.5, 5.5, '0.0'),
 Text(0.5, 6.5, '0.0'),
 Text(1.5, 6.5, '0.2'),
 Text(2.5, 6.5, '0.1'),
 Text(3.5, 6.5, '0.0'),
 Text(4.5, 6.5, '0.2'),
 Text(5.5, 6.5, '0.1'),
 Text(0.5, 7.5, '0.0'),
 Text(1.5, 7.5, '0.1'),
 Text(2.5, 7.5, '-0.0'),
 Text(3.5, 7.5, '-0.1'),
 Text(4.5, 7.5, '0.1'),
 Text(5.5, 7.5, '0.0'),
 Text(6.5, 7.5, '0.2'),
 Text(0.5, 8.5, '0.0'),
 Text(1.5, 8.5, '0.1'),
 Text(2.5, 8.5, '-0.0'),
 Text(3.5, 8.5, '-0.0'),
 Text(4.5, 8.5, '0.1'),
 Text(5.5, 8.5, '0.0'),
 Text(6.5, 8.5, '0.1'),
 Text(7.5, 8.5, '0.4'),
 Text(0.5, 9.5, '-0.0'),
 Text(1.5, 9.5, '-0.0'),
 Text(2.5, 9.5, '0.3'),
 Text(3.5, 9.5, '0.2'),
 Text(4.5, 9.5, '0.1'),
 Text(5.5, 9.5, '-0.0'),
 Text(6.5, 9.5, '0.0'),
 Text(7.5, 9.5, '0.0'),
 Text(8.5, 9.5, '-0.0'),
 Text(0.5, 10.5, '-0.0'),
 Text(1.5, 10.5, '-0.0'),
 Text(2.5, 10.5, '0.2'),
 Text(3.5, 10.5, '0.1'),
 Text(4.5, 10.5, '0.1'),
 Text(5.5, 10.5, '0.0'),
 Text(6.5, 10.5, '0.0'),
 Text(7.5, 10.5, '0.0'),
 Text(8.5, 10.5, '0.0'),
 Text(9.5, 10.5, '0.3'),
 Text(0.5, 11.5, '0.0'),
 Text(1.5, 11.5, '-0.0'),
 Text(2.5, 11.5, '0.0'),
 Text(3.5, 11.5, '-0.0'),
 Text(4.5, 11.5, '-0.0'),
 Text(5.5, 11.5, '-0.0'),
 Text(6.5, 11.5, '0.0'),
 Text(7.5, 11.5, '0.0'),
 Text(8.5, 11.5, '-0.0'),
 Text(9.5, 11.5, '0.0'),
 Text(10.5, 11.5, '0.0'),
 Text(0.5, 12.5, '0.0'),
 Text(1.5, 12.5, '0.2'),
 Text(2.5, 12.5, '0.0'),
 Text(3.5, 12.5, '-0.0'),
 Text(4.5, 12.5, '0.2'),
 Text(5.5, 12.5, '0.1'),
 Text(6.5, 12.5, '0.3'),
 Text(7.5, 12.5, '0.2'),
 Text(8.5, 12.5, '0.1'),
 Text(9.5, 12.5, '-0.0'),
 Text(10.5, 12.5, '-0.0'),
 Text(11.5, 12.5, '-0.0'),
 Text(0.5, 13.5, '-0.0'),
 Text(1.5, 13.5, '0.1'),
 Text(2.5, 13.5, '-0.1'),
 Text(3.5, 13.5, '-0.1'),
 Text(4.5, 13.5, '0.7'),
 Text(5.5, 13.5, '0.0'),
 Text(6.5, 13.5, '0.2'),
 Text(7.5, 13.5, '0.1'),
 Text(8.5, 13.5, '0.1'),
 Text(9.5, 13.5, '-0.0'),
 Text(10.5, 13.5, '0.0'),
 Text(11.5, 13.5, '-0.0'),
 Text(12.5, 13.5, '0.1'),
 <matplotlib.axis.XAxis at 0x2a42c148>,
 <matplotlib.axis.YAxis at 0x2c3c5b80>,
 <matplotlib.patches.Rectangle at 0x2c3e50d0>]

However if I run the full command from line 45 of test_module.py, every bit of that excess test is removed, to include the three trailing items.

Output of [text.get_text() for text in self.ax.get_default_bbox_extra_artists() if isinstance(text, mpl.text.Text)]:

['0.0',
 '0.0',
 '-0.0',
 '0.0',
 '-0.1',
 '0.5',
 '0.0',
 '0.1',
 '0.1',
 '0.3',
 '0.0',
 '0.0',
 '0.0',
 '0.0',
 '0.0',
 '0.0',
 '0.2',
 '0.1',
 '0.0',
 '0.2',
 '0.1',
 '0.0',
 '0.1',
 '-0.0',
 '-0.1',
 '0.1',
 '0.0',
 '0.2',
 '0.0',
 '0.1',
 '-0.0',
 '-0.0',
 '0.1',
 '0.0',
 '0.1',
 '0.4',
 '-0.0',
 '-0.0',
 '0.3',
 '0.2',
 '0.1',
 '-0.0',
 '0.0',
 '0.0',
 '-0.0',
 '-0.0',
 '-0.0',
 '0.2',
 '0.1',
 '0.1',
 '0.0',
 '0.0',
 '0.0',
 '0.0',
 '0.3',
 '0.0',
 '-0.0',
 '0.0',
 '-0.0',
 '-0.0',
 '-0.0',
 '0.0',
 '0.0',
 '-0.0',
 '0.0',
 '0.0',
 '0.0',
 '0.2',
 '0.0',
 '-0.0',
 '0.2',
 '0.1',
 '0.3',
 '0.2',
 '0.1',
 '-0.0',
 '-0.0',
 '-0.0',
 '-0.0',
 '0.1',
 '-0.1',
 '-0.1',
 '0.7',
 '0.0',
 '0.2',
 '0.1',
 '0.1',
 '-0.0',
 '0.0',
 '-0.0',
 '0.1']

I’ve tried adjusting the parameters of my heatmap but have had no luck thus far. Any hint of where I should be looking would be most appreciated.

Post #2 from @ArbyC on the below thread was my issue. Once I updated to the proper version of Matplotlib the test passed.