The documentation for hist says that the color kwarg can take a sequence
of rgba tuples. However, anytime I pass a sequence I get:
Traceback (most recent call last):
File "./chromoplot.py", line 283, in <module>
main() File "./chromoplot.py", line 280, in main
plot(data_file, figure_file, options)
File "./chromoplot.py", line 225, in plot
c.plot(figure_file)
File "./chromoplot.py", line 220, in plot
fig.savefig(figure_file)
File "/Library/Python/2.6/site-packages/matplotlib/figure.py", line
1032, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/Library/Python/2.6/site-packages/matplotlib/backend_bases.py",
line 1476, in print_figure
**kwargs)
File
"/Library/Python/2.6/site-packages/matplotlib/backends/backend_agg.py",
line 358, in print_png
FigureCanvasAgg.draw(self)
File
"/Library/Python/2.6/site-packages/matplotlib/backends/backend_agg.py",
line 314, in draw
self.figure.draw(self.renderer)
File "/Library/Python/2.6/site-packages/matplotlib/artist.py", line 46,
in draw_wrapper
draw(artist, renderer, *kl)
File "/Library/Python/2.6/site-packages/matplotlib/figure.py", line
773, in draw
for a in self.axes: a.draw(renderer)
File "/Library/Python/2.6/site-packages/matplotlib/artist.py", line 46,
in draw_wrapper
draw(artist, renderer, *kl)
File "/Library/Python/2.6/site-packages/matplotlib/axes.py", line 1735,
in draw
a.draw(renderer)
File "/Library/Python/2.6/site-packages/matplotlib/artist.py", line 46,
in draw_wrapper
draw(artist, renderer, *kl)
File "/Library/Python/2.6/site-packages/matplotlib/patches.py", line
298, in draw
gc.set_foreground(self._edgecolor)
File "/Library/Python/2.6/site-packages/matplotlib/backend_bases.py",
line 628, in set_foreground
self._rgb = colors.colorConverter.to_rgba(fg)
File "/Library/Python/2.6/site-packages/matplotlib/colors.py", line
353, in to_rgba
raise ValueError('to_rgba: Invalid rgba arg "%s"\n%s' % (str(arg), exc))
ValueError: to_rgba: Invalid rgba arg "((1, 0, 0, 1), (0, 1, 0, 1))"
need more than 2 values to unpack
···
--
John Didion
Computational Biology, PhD Student
Fernando Pardo-Manuel de Villena Lab
UNC Chapel Hill