import matplotlib
matplotlib.use('Agg')
from ggplot import *
p = ggplot(aes(x='date', y='beef'), data=meat)
a = p + geom_point()
a.save_as_base64()
error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/anaconda3/lib/python3.5/site-packages/ggplot/ggplot.py", line 574, in save_as_base64
self.save(imgdata, width=width, height=height, dpi=dpi)
File "/opt/anaconda3/lib/python3.5/site-packages/ggplot/ggplot.py", line 556, in save
self.fig.savefig(filename)
File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/figure.py", line 1572, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/backend_bases.py", line 2244, in print_figure
**kwargs)
File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 556, in print_png
_png.write_png(renderer._renderer, filename_or_obj, self.figure.dpi)
TypeError: string argument expected, got 'bytes'
centos 7.0 GCC 4.4.7 Python 3.5.2 |Anaconda 4.1.1 (64-bit)|
code:
error:
what's happy? thanks!