loglog plot problem

I appreciate the effort. It works fine provided I delete

    > the line "backend: TkAgg" which I'd had in my
    > ~/.matplotlibrc file. Otherwise I get a core dump. I
    > don't recall why I was using this instead of the default
    > GTKAgg backend.

So you're saying you get a segfault on CVS with tkagg?

Would you be willing to try a few things

* rm -rf site-packages/matplotlib and your build subdir and do a
   clean build. Do you still see the problem?

* If so, repeat above but recompile matplotlib setting verbose = True
   in setup.py and rerun. If you get the segfault, post the last
   score or so lines of output

* send a script that generates the fault.

Thanks!
JDH

John Hunter wrote:

"Stephen" == Stephen Walton <stephen.walton@...197...> writes:

    > I appreciate the effort. It works fine provided I delete
    > the line "backend: TkAgg" which I'd had in my
    > ~/.matplotlibrc file. Otherwise I get a core dump. I
    > don't recall why I was using this instead of the default
    > GTKAgg backend.

So you're saying you get a segfault on CVS with tkagg?

Would you be willing to try a few things

* rm -rf site-packages/matplotlib and your build subdir and do a
   clean build. Do you still see the problem?

Alternatively, (and this allows you to keep a 'safe' matplotlib in-place, or switch to it as needed), my stategy is:

1. Rename site-packages/matplotlib to .ori, and symlink to the CVS tree:

root@...198...[site-packages]# d -d matplotlib*
/usr/lib/python2.3/site-packages
lrwxrwxrwx 1 root 51 Feb 7 16:57 matplotlib -> /usr/local/installers/src/matplotlib/lib/matplotlib/
drwxr-xr-x 4 fperez 4096 Feb 4 10:01 matplotlib.ori/

2. In the CVS tree, manually symlink all the shared libraries to the path of the build dir:

root@...198...[matplotlib]# dl
/usr/local/installers/src/matplotlib/lib/matplotlib
lrwxrwxrwx 1 fperez 83 Feb 7 16:59 ft2font.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/ft2font.so*
lrwxrwxrwx 1 fperez 87 Feb 7 16:58 _nc_contour.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/_nc_contour.so*
lrwxrwxrwx 1 fperez 85 Feb 7 16:58 _nc_image.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/_nc_image.so*
lrwxrwxrwx 1 fperez 90 Feb 7 16:58 _nc_transforms.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/_nc_transforms.so*

root@...198...[matplotlib]# dl backends
/usr/local/installers/src/matplotlib/lib/matplotlib
lrwxrwxrwx 1 fperez 92 Feb 7 16:58 _gtkagg.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/backends/_gtkagg.so*
lrwxrwxrwx 1 fperez 100 Feb 9 14:55 _nc_backend_agg.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/backends/_nc_backend_agg.so*
lrwxrwxrwx 1 fperez 91 Feb 7 16:58 _tkagg.so -> /usr/local/installers/src/matplotlib/build/lib.linux-i686-2.3/matplotlib/backends/_tkagg.so*

These symlinks can be established in 10 seconds with md anc C-x-s.

3. When you do a CVS update in the mpl top-level dir, simply do

rm -rf build
python setup.py build

This will rebuild all the needed extensions, and your symlinks will pick them up automagically.

If you ever need to go back to the released mpl, simply repoint the matplotlib symlink in site-packages to .ori.

This is the simplest setup I've been able to find to handle transparently CVS python code with extensions. It only breaks if the CVS code springs a new extension module (or renames one), but that is fixed in a second with the proper new symlink.

Cheers,

f

John Hunter wrote:

So you're saying you get a segfault on CVS with tkagg?

Would you be willing to try a few things

* rm -rf site-packages/matplotlib and your build subdir and do a
  clean build. Do you still see the problem?

I did both this and rm -rf /usr/share/matplotlib. This fixed the problem. I had done 'rpm -U' after "setup.py bdist_rpm" to replace 0.71 with 0.72. I may try to go back and duplicate the problem, but not today.

Stephen Walton wrote:

John Hunter wrote:

So you're saying you get a segfault on CVS with tkagg?

Would you be willing to try a few things

* rm -rf site-packages/matplotlib and your build subdir and do a
clean build. Do you still see the problem?

I did both this and rm -rf /usr/share/matplotlib. This fixed the problem. I had done 'rpm -U' after "setup.py bdist_rpm" to replace 0.71 with 0.72. I may try to go back and duplicate the problem, but not today.

Don't bother, I doubt you'll be able to. It was most likely caused by a clash with old extension code. I'm pounding on the TkAgg backend heavily, with multiple plot figures open concurrently with multiple MayaVi windows (which have VTK render windows embedded), and I don't have any problems (other than a VTK window destruction bug John is fixing at this very moment :slight_smile:

Best,

f