Permalink
Browse files

dphenome plot: avoid crashes on non-square legends

  • Loading branch information...
1 parent 373acd4 commit 925b460a602e467634a5cd50e894d0b5c73d5fae @mgalardini mgalardini committed Feb 25, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 ductape/phenome/biolog.py
@@ -690,6 +690,8 @@ def plotLegend(self, plate_id, strains=[]):
# Plot the strains names in the proper order
for i in range(len(array)):
for j in range(len(array[i])):
+ if array[i,j] not in self.colors:
+ continue
ax.text(j, i, array[i,j], color=self.colors[array[i,j]],
fontsize='x-large', fontweight='bold', ha='center')

0 comments on commit 925b460

Please sign in to comment.