matplotlib - Python "Invalid rgb arg "None"" -


i have code creates , saves plot, using matplotlib , python. code runs flawlessly @ laptop of supervisor, has matplotlib 1.1.1. however, despite fact have newer version of matplotlib(1.3.1) following error when executing command:

plt.savefig("outputs/" + run_uuid +".pdf", facecolor='white', bbox_inches='tight', pad_inches=0.0) 

i following traceback on command:

traceback (most recent call last):   file "vis.py", line 1116, in <module>     plt.savefig("outputs/" + run_uuid +".pdf", facecolor='white', bbox_inches='tight', pad_inches=0.0)   file "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 561, in savefig     return fig.savefig(*args, **kwargs)   file "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1421, in savefig     self.canvas.print_figure(*args, **kwargs)   file "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 2167, in print_figure     **kwargs)   file "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 1952, in print_pdf     return pdf.print_pdf(*args, **kwargs)   file "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_pdf.py", line 2352, in print_pdf     self.figure.draw(renderer)   file "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper     draw(artist, renderer, *args, **kwargs)   file "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1034, in draw     func(*args)   file "/usr/lib/pymodules/python2.7/mpl_toolkits/axisartist/axislines.py", line 774, in draw     super(axes, self).draw(renderer, inframe)   file "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper     draw(artist, renderer, *args, **kwargs)   file "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 2086, in draw     a.draw(renderer)   file "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper     draw(artist, renderer, *args, **kwargs)   file "/usr/lib/pymodules/python2.7/matplotlib/lines.py", line 530, in draw     gc.set_foreground(ln_color_rgba)   file "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 921, in set_foreground     self._rgb = colors.colorconverter.to_rgba(fg)   file "/usr/lib/pymodules/python2.7/matplotlib/colors.py", line 365, in to_rgba     'to_rgba: invalid rgba arg "%s"\n%s' % (str(arg), exc)) valueerror: to_rgba: invalid rgba arg "none" to_rgb: invalid rgb arg "none" cannot convert argument rgb sequence 

i couldn't find useful in net error. know doing wrong?

i tried rewrite this

plt.savefig("outputs/" + run_uuid +".pdf", facecolor='white', bbox_inches='tight', pad_inches=0.0) 

to this:

plt.savefig("outputs/" + run_uuid +".pdf") 

but without progress

i think reason facecolor doesn't have value of 'white'.

from the following link, no 'white' exists in facecolor setting.

what if use plt.savefig("your path")? think default background color should white.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -