From: Michael D. <md...@st...> - 2010-12-16 20:40:50
|
What platform are you on? It "works for me" on Fedora 14, RHEL 5 and Cygwin. Mike On 12/16/2010 10:59 AM, Dieter Weber wrote: > #!/usr/bin/env python > # -*- coding: utf-8 -*- > import matplotlib > import matplotlib.pyplot as pp > import tempfile > import cStringIO as StringIO > > matplotlib.rcParams['svg.embed_char_paths'] = False > > pp.plot([1, 2], [1, 2], label=u"äöü") > pp.legend() > > # works > pp.savefig('test.svg') > > # breaks > with open('test2.svg', 'wb') as ofile: > pp.savefig(ofile, format='svg') > > # breaks > ostr = StringIO.StringIO() > pp.savefig(ostr, format='svg') |