Re: [matplotlib-devel] Small fix for SVG backend

2010-12-16 Thread Michael Droettboom
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.rc

[matplotlib-devel] Displaying offsets in 3d plots

2010-12-16 Thread Benjamin Root
I have been working on a new feature for mplot3d. It is a bit of a hack but with this patch the offset information in a tick formatter can now be displayed. The offset text is located so that the offset texts for two jointed axis are not co-located, and is placed at the same distance away from th

Re: [matplotlib-devel] Small fix for SVG backend

2010-12-16 Thread Dieter Weber
Hi Mike, the error only occurs if the output file is specified as a file(-like) object instead of a file name. This is necessary for me in order to add a matplotlib-generated file to a tar archive via a safe temporary file. Greetings, Dieter #!/usr/bin/env python # -*- coding: utf-8 -*- import mat

Re: [matplotlib-devel] Small fix for SVG backend

2010-12-16 Thread Michael Droettboom
Unfortunately, this isn't a complete solution. The purpose of the "escape_xml_chars" function is to escape characters that have special meaning in XML, e.g. "&" -> "&", "<" -> "<" etc. The "xmlcharrefreplace" option on encode() does not do that. I am surprised that you got this traceback, as

[matplotlib-devel] Small fix for SVG backend

2010-12-16 Thread Dieter Weber
Hi, I tried to use matplotlib.rcParams['svg.embed_char_paths'] = False in order to have editable text in exported SVG, but there was an encoding issue and the file data could not be written (traceback appended). Therefore I exchanged the XML character escaping from sax in backend_svg.py with pytho