{"action":"created","issue":{"url":"https://api.github.com/repos/mwaskom/seaborn/issues/486","labels_url":"https://api.github.com/repos/mwaskom/seaborn/issues/486/labels{/name}","comments_url":"https://api.github.com/repos/mwaskom/seaborn/issues/486/comments","events_url":"https://api.github.com/repos/mwaskom/seaborn/issues/486/events","html_url":"https://github.com/mwaskom/seaborn/issues/486","id":64001314,"number":486,"title":"How to define row/column colors without using row/column clustering in heatmap/clustermap","user":{"login":"fbrundu","id":697622,"avatar_url":"https://avatars.githubusercontent.com/u/697622?v=3","gravatar_id":"","url":"https://api.github.com/users/fbrundu","html_url":"https://github.com/fbrundu","followers_url":"https://api.github.com/users/fbrundu/followers","following_url":"https://api.github.com/users/fbrundu/following{/other_user}","gists_url":"https://api.github.com/users/fbrundu/gists{/gist_id}","starred_url":"https://api.github.com/users/fbrundu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbrundu/subscriptions","organizations_url":"https://api.github.com/users/fbrundu/orgs","repos_url":"https://api.github.com/users/fbrundu/repos","events_url":"https://api.github.com/users/fbrundu/events{/privacy}","received_events_url":"https://api.github.com/users/fbrundu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-24T13:58:37Z","updated_at":"2015-04-05T21:00:40Z","closed_at":"2015-04-04T20:25:44Z","body":"Hi all,\r\nI am trying to figure out if there is a way to define row/column colors using heatmap or clustermap, such as using the `{row,col}_colors` parameter in clustermap but without the need for a clustering or dendrogram over row and columns. Using it with `{row,col}_cluster=False` produces:\r\n\r\n    ---------------------------------------------------------------------------\r\n    AttributeError                            Traceback (most recent call last)\r\n    <ipython-input-10-5d656f053811> in <module>()\r\n          2 act, samples = results_anova.shape\r\n          3 plt.figure(1, figsize=[samples/5, act/5])\r\n    ----> 4 sns.clustermap(results_anova, col_colors=col_colors, figsize=(samples/5, act/5), col_cluster=False, row_cluster=False)\r\n          5 plt.savefig(\"heatmap_anova.svg\", bbox_inches=\"tight\")\r\n          6 plt.savefig(\"heatmap_anova.pdf\", bbox_inches=\"tight\")\r\n\r\n    /usr/local/lib/python3.4/dist-packages/seaborn/matrix.py in clustermap(data, pivot_kws, method, metric, z_score, standard_scale, figsize, cbar_kws, row_cluster, col_cluster, row_linkage, col_linkage, row_colors, col_colors, mask, **kwargs)\r\n        893                         row_linkage=row_linkage, col_linkage=col_linkage,\r\n        894                         mask=mask,\r\n    --> 895                         **kwargs)\r\n\r\n    /usr/local/lib/python3.4/dist-packages/seaborn/matrix.py in plot(self, metric, method, colorbar_kws, row_cluster, col_cluster, row_linkage, col_linkage, mask, **kws)\r\n        810         self.plot_dendrograms(row_cluster, col_cluster, metric, method,\r\n        811                               row_linkage=row_linkage, col_linkage=col_linkage)\r\n    --> 812         self.plot_colors(**kws)\r\n        813         self.plot_matrix(colorbar_kws, mask, **kws)\r\n        814         return self\r\n\r\n    /usr/local/lib/python3.4/dist-packages/seaborn/matrix.py in plot_colors(self, **kws)\r\n        782         if self.col_colors is not None:\r\n        783             matrix, cmap = self.color_list_to_matrix_and_cmap(\r\n    --> 784                 self.col_colors, self.dendrogram_col.reordered_ind, axis=1)\r\n        785             heatmap(matrix, cmap=cmap, cbar=False, ax=self.ax_col_colors,\r\n        786                     xticklabels=False, yticklabels=False,\r\n\r\n    AttributeError: 'NoneType' object has no attribute 'reordered_ind'\r\n\r\nIs that possible?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/mwaskom/seaborn/issues/comments/89850310","html_url":"https://github.com/mwaskom/seaborn/issues/486#issuecomment-89850310","issue_url":"https://api.github.com/repos/mwaskom/seaborn/issues/486","id":89850310,"user":{"login":"fbrundu","id":697622,"avatar_url":"https://avatars.githubusercontent.com/u/697622?v=3","gravatar_id":"","url":"https://api.github.com/users/fbrundu","html_url":"https://github.com/fbrundu","followers_url":"https://api.github.com/users/fbrundu/followers","following_url":"https://api.github.com/users/fbrundu/following{/other_user}","gists_url":"https://api.github.com/users/fbrundu/gists{/gist_id}","starred_url":"https://api.github.com/users/fbrundu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbrundu/subscriptions","organizations_url":"https://api.github.com/users/fbrundu/orgs","repos_url":"https://api.github.com/users/fbrundu/repos","events_url":"https://api.github.com/users/fbrundu/events{/privacy}","received_events_url":"https://api.github.com/users/fbrundu/received_events","type":"User","site_admin":false},"created_at":"2015-04-05T21:00:40Z","updated_at":"2015-04-05T21:00:40Z","body":"Yes, I think it is fixed now. I will let you know if I have issues. Thanks :)"}}