dolphin save as svg broken

I am sure this is not a matplotlib problem, but I am not sure whos it
is, so I'll start here:

http://matplotlib.sourceforge.net/examples/pylab_examples/dolphin.html
the blue and green dots should only be inside the circle.

Run the code, you get a window that has a 'save' button, the dialog
has a 'type svg' option
the svg renders with the blue/green dots everywhere (rendering using
both rsvg-view and inkscape, which use different rendering engines.)
save as png, display png, dots only inside circle.

···

--
Carl K

Yup, clipping is completely broken in SVG, reported here:

http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTik-Ty-V-QFEmkjhJH%2B-%3DtEZTTXyJLXxW%2B34E_hh%40mail.gmail.com&forum_name=matplotlib-devel

Cheers,

f

···

On Tue, Oct 12, 2010 at 3:03 PM, Carl Karsten <carl@...3320...> wrote:

Run the code, you get a window that has a 'save' button, the dialog
has a 'type svg' option
the svg renders with the blue/green dots everywhere (rendering using
both rsvg-view and inkscape, which use different rendering engines.)
save as png, display png, dots only inside circle.

Yes, but this is fixed in SVN 1.0 branch and trunk -- at least for me. Not for you?

Mike

···

On 10/12/2010 07:16 PM, Fernando Perez wrote:

On Tue, Oct 12, 2010 at 3:03 PM, Carl Karsten<carl@...3320...> wrote:
   

Run the code, you get a window that has a 'save' button, the dialog
has a 'type svg' option
the svg renders with the blue/green dots everywhere (rendering using
both rsvg-view and inkscape, which use different rendering engines.)
save as png, display png, dots only inside circle.

Yup, clipping is completely broken in SVG, reported here:

http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTik-Ty-V-QFEmkjhJH%2B-%3DtEZTTXyJLXxW%2B34E_hh%40mail.gmail.com&forum_name=matplotlib-devel
   

--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA

carl@...3321...:~/Videos/veyepar/test_client/test_show/flv$ apt-cache policy
python-matplotlib
python-matplotlib:
  Installed: 0.99.3-1ubuntu1
  Candidate: 0.99.3-1ubuntu1
  Version table:
*** 0.99.3-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/universe
amd64 Packages
        100 /var/lib/dpkg/status

Is there a PPA that tracks trunk?

···

On Wed, Oct 13, 2010 at 8:33 AM, Michael Droettboom <mdroe@...86...> wrote:

On 10/12/2010 07:16 PM, Fernando Perez wrote:

On Tue, Oct 12, 2010 at 3:03 PM, Carl Karsten<carl@...3320...> wrote:

Run the code, you get a window that has a 'save' button, the dialog
has a 'type svg' option
the svg renders with the blue/green dots everywhere (rendering using
both rsvg-view and inkscape, which use different rendering engines.)
save as png, display png, dots only inside circle.

Yup, clipping is completely broken in SVG, reported here:

http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTik-Ty-V-QFEmkjhJH%2B-%3DtEZTTXyJLXxW%2B34E_hh%40mail.gmail.com&forum_name=matplotlib-devel

Yes, but this is fixed in SVN 1.0 branch and trunk -- at least for me.
Not for you?

--
Carl K

Run the code, you get a window that has a 'save' button, the dialog
has a 'type svg' option
the svg renders with the blue/green dots everywhere (rendering using
both rsvg-view and inkscape, which use different rendering engines.)
save as png, display png, dots only inside circle.

Yup, clipping is completely broken in SVG, reported here:

http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTik-Ty-V-QFEmkjhJH%2B-%3DtEZTTXyJLXxW%2B34E_hh%40mail.gmail.com&forum_name=matplotlib-devel

Yes, but this is fixed in SVN 1.0 branch and trunk -- at least for me.
Not for you?

carl@...3321...:~/Videos/veyepar/test_client/test_show/flv$ apt-cache policy
python-matplotlib
python-matplotlib:
Installed: 0.99.3-1ubuntu1
Candidate: 0.99.3-1ubuntu1
Version table:
*** 0.99.3-1ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ maverick/universe
amd64 Packages
100 /var/lib/dpkg/status

Is there a PPA that tracks trunk?

I suggest

sudo apt-get build_dep numpy scipy matplotlib
svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib
cd matplotlib
python setup.py install --prefix=~/something

and then set your PYTHONPATH accordingly.

See also http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn

···

On Wed, Oct 13, 2010 at 10:19 AM, Carl Karsten <carl@...3320...> wrote:

On Wed, Oct 13, 2010 at 8:33 AM, Michael Droettboom <mdroe@...86...> wrote:

On 10/12/2010 07:16 PM, Fernando Perez wrote:

On Tue, Oct 12, 2010 at 3:03 PM, Carl Karsten<carl@...3320...> wrote:

E: Unable to find a source package for numpy

I am guessing it should be:

sudo apt-get build-dep python-numpy python-scipy python-matplotlib

···

On Wed, Oct 13, 2010 at 10:25 AM, John Hunter <jdh2358@...287...> wrote:

sudo apt-get build_dep numpy scipy matplotlib

--
Carl K

"Need to get 535MB of archives."

I am on a pretty slow shared connection, so need to wait a week to get
back home before I do this.

···

On Wed, Oct 13, 2010 at 10:43 AM, Carl Karsten <carl@...3320...> wrote:

On Wed, Oct 13, 2010 at 10:25 AM, John Hunter <jdh2358@...287...> wrote:

sudo apt-get build_dep numpy scipy matplotlib

E: Unable to find a source package for numpy

I am guessing it should be:

sudo apt-get build-dep python-numpy python-scipy python-matplotlib

--
Carl K

How much does just the mpl part cost you?

···

On Wed, Oct 13, 2010 at 10:45 AM, Carl Karsten <carl@...3320...> wrote:

"Need to get 535MB of archives."

I am on a pretty slow shared connection, so need to wait a week to get
back home before I do this.

519

carl@...3321...:~/Videos/veyepar/test_client/test_show$ sudo apt-get
build-dep python-matplotlib
[sudo] password for carl:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Picking 'matplotlib' as source package instead of 'python-matplotlib'
The following NEW packages will be installed:
  dvipng global graphviz ipython lacheck latex-beamer latex-xcolor libcgraph5
  libffi-dev libgvpr1 libwxbase2.8-0 libwxbase2.8-dbg libwxgtk2.8-0
  libwxgtk2.8-dbg libxss-dev lmodern luatex pgf preview-latex-style prosper
  ps2eps python-all python-all-dbg python-all-dev python-apptools
  python-configobj python-dbg python-docutils python-enthoughtbase
  python-epydoc python-foolscap python-gobject-dev python-gtk2-dev
  python-gtk2-doc python-jinja2 python-numpy-dbg python-qt4 python-qt4-dev
  python-roman python-sip python-sip-dev python-sphinx python-traits
  python-wxgtk2.8 python-wxgtk2.8-dbg python-wxversion python2.6-dbg
  tcl8.5-dev tex-common texlive-base texlive-binaries texlive-common
  texlive-doc-base texlive-extra-utils texlive-font-utils
  texlive-fonts-recommended texlive-fonts-recommended-doc
  texlive-generic-recommended texlive-latex-base texlive-latex-base-doc
  texlive-latex-extra texlive-latex-extra-doc texlive-latex-recommended
  texlive-latex-recommended-doc texlive-luatex texlive-pictures
  texlive-pictures-doc texlive-pstricks texlive-pstricks-doc tipa tk8.5-dev
  wx2.8-headers x11proto-scrnsaver-dev
0 upgraded, 73 newly installed, 0 to remove and 0 not upgraded.
Need to get 519MB of archives.
After this operation, 1,016MB of additional disk space will be used.

···

On Wed, Oct 13, 2010 at 11:14 AM, John Hunter <jdh2358@...287...> wrote:

On Wed, Oct 13, 2010 at 10:45 AM, Carl Karsten <carl@...3320...> wrote:

"Need to get 535MB of archives."

I am on a pretty slow shared connection, so need to wait a week to get
back home before I do this.

How much does just the mpl part cost you?

--
Carl K

so I checked with the other people on the remote dsl connection and
got the ok to hog the bandwidth...

39% [85 texlive-latex-extra-doc 21.9MB/193MB 11%] 14.9kB/s 6h 2min 52s

sometimes it goes down to 2h... but still: yuck. ^C, this can wait.

···

On Wed, Oct 13, 2010 at 11:37 AM, Carl Karsten <carl@...3320...> wrote:

On Wed, Oct 13, 2010 at 11:14 AM, John Hunter <jdh2358@...287...> wrote:

On Wed, Oct 13, 2010 at 10:45 AM, Carl Karsten <carl@...3320...> wrote:

"Need to get 535MB of archives."

I am on a pretty slow shared connection, so need to wait a week to get
back home before I do this.

How much does just the mpl part cost you?

519

carl@...3321...:~/Videos/veyepar/test_client/test_show$ sudo apt-get
build-dep python-matplotlib

--
Carl K

Nope, identical behavior, just tested with a rebuilt-from-now numpy and mpl:

amirbar[matplotlib]> svn info
Path: .
URL: https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib
Repository Root: https://matplotlib.svn.sourceforge.net/svnroot/matplotlib
Repository UUID: f61c4167-ca0d-0410-bb4a-bb21726e55ed
Revision: 8753
Node Kind: directory
Schedule: normal
Last Changed Author: mdboom
Last Changed Rev: 8753
Last Changed Date: 2010-10-13 11:04:01 -0700 (Wed, 13 Oct 2010)

This was tested on linux, ubuntu 10.04 (both 32 and 64 bits). Only
numpy and matplotlib are source builds, all other dependencies are
system libraries.

Cheers,

f

···

On Wed, Oct 13, 2010 at 6:33 AM, Michael Droettboom <mdroe@...86...> wrote:

Yes, but this is fixed in SVN 1.0 branch and trunk -- at least for me.
Not for you?

OK, the plot thickens. I may have spoken too fast: the behavior we
see in the Qt console is indeed the same I reported earlier, and the
MPL bug where doing pastefig() (which just calls savefig() to svg)
causes the bad redrawing of the axis is still there, and definitely a
MPL issue.

BUT, if I save the svg manually to a file from mpl or from the Qt
console, so the raw SVG data is written out, then it looks fine once I
open it in inkscape.

So it seems the problem is actually with the Qt widget's display of
that SVG file, somehow it seems the Qt widget doesn't correctly
understand the clipping info (which Inkscape is OK with).

We'll bounce this over to the Qt folks to see if it's a known bug in Qt.

In summary, only the bad redrawing of axes is a confirmed MPL issue,
sorry for the confusion.

Cheers,

f

···

On Wed, Oct 13, 2010 at 11:34 AM, Fernando Perez <fperez.net@...287...> wrote:

Nope, identical behavior, just tested with a rebuilt-from-now numpy and mpl:

And for the record, I can confirm that from trunk, a saved
dolphins.svg opens OK with inkscape. The bug (as mentioned on -dev)
we're seeing is actually a Qt bug.

Cheers,

f

···

On Wed, Oct 13, 2010 at 6:33 AM, Michael Droettboom <mdroe@...86...> wrote:

Yes, but this is fixed in SVN 1.0 branch and trunk -- at least for me.
Not for you?