Create z matrix to make heatmap with striped table coloring :rtype (list[list]) table_matrix: z matrix to make heatmap with striped table coloring.
(self)
| 197 | self.y = range(len(table_text)) |
| 198 | |
| 199 | def get_table_matrix(self): |
| 200 | """ |
| 201 | Create z matrix to make heatmap with striped table coloring |
| 202 | |
| 203 | :rtype (list[list]) table_matrix: z matrix to make heatmap with striped |
| 204 | table coloring. |
| 205 | """ |
| 206 | header = [0] * len(self.table_text[0]) |
| 207 | odd_row = [0.5] * len(self.table_text[0]) |
| 208 | even_row = [1] * len(self.table_text[0]) |
| 209 | table_matrix = [None] * len(self.table_text) |
| 210 | table_matrix[0] = header |
| 211 | for i in range(1, len(self.table_text), 2): |
| 212 | table_matrix[i] = odd_row |
| 213 | for i in range(2, len(self.table_text), 2): |
| 214 | table_matrix[i] = even_row |
| 215 | if self.index: |
| 216 | for array in table_matrix: |
| 217 | array[0] = 0 |
| 218 | return table_matrix |
| 219 | |
| 220 | def get_table_font_color(self): |
| 221 | """ |