Updating MPlot3D to a more recent matplotlib.

Hey Reiner -- please make sure you "reply-to-all" so others can
participate in the thread. I'm am CC-ing the reply to the list.

That is one issue, but if I try to solve that I get some
strange-looking result. It seems that the patches I am drawing are not
scaled properly; they are way too large. Do you know of any obvious
change that might have resulted in this (I guess it might be in the
"transform" parts)? And is there perhaps a nice web-interface to
compare different versions of various files?

What version of mpl are you using? The major transform work was done
between 0.91 and 0.98, which is why we removed the 3D stuff at that
time. I assume you are already on some version of 0.98, so hopefully
the transforms changes from your branch to svn HEAD will be minimal.
The code diffs can be found at
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/

I also removed the TextWithDash and saw the scaling problems you point to.

JDH

···

On Wed, Apr 1, 2009 at 5:19 PM, Reinier Heeres <reinier@...707...> wrote:

Hi,

It took me a while to get this done, but I managed to make mplot3d
working with svn trunk again!

It's available for viewing at
http://qtwork.nano.tudelft.nl/cgi-bin/gitweb.cgi?p=users/rwh/mplot3d;a=summary.
An http link to clone it is on that same page.

JDH: If there are no further issues with moving this to svn, how do
you want to proceed? It can surely use some more bugfixes later on and
it would be great if I could commit those directly, although sending
patches would be ok too.

One thing I ran into: it is not possible to unset the alpha value for
a Collection. Because of this it is not possible to set alpha values
for individual items once a Collection-wide value is set. I think the
solution would be to accept None as a value in set_alpha(); I solved
it now by setting coll._alpha = None in mplot3d.
(The reason this was not a problem earlier is this bug-fix:
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/colors.py?r1=6982&r2=6986)

Regards,
Reinier

···

On Thu, Apr 2, 2009 at 1:55 PM, John Hunter <jdh2358@...149...> wrote:

Hey Reiner -- please make sure you "reply-to-all" so others can
participate in the thread. I'm am CC-ing the reply to the list.

On Wed, Apr 1, 2009 at 5:19 PM, Reinier Heeres <reinier@...707...> wrote:

That is one issue, but if I try to solve that I get some
strange-looking result. It seems that the patches I am drawing are not
scaled properly; they are way too large. Do you know of any obvious
change that might have resulted in this (I guess it might be in the
"transform" parts)? And is there perhaps a nice web-interface to
compare different versions of various files?

What version of mpl are you using? The major transform work was done
between 0.91 and 0.98, which is why we removed the 3D stuff at that
time. I assume you are already on some version of 0.98, so hopefully
the transforms changes from your branch to svn HEAD will be minimal.
The code diffs can be found at
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/

I also removed the TextWithDash and saw the scaling problems you point to.

JDH

--
Reinier Heeres
Bleijenburg 64
2511 VD Den Haag
The Netherlands

Tel: +31 6 10852639

Hi,

It took me a while to get this done, but I managed to make mplot3d
working with svn trunk again!

Hmm, this does not seem to be against svn HEAD on the trunk. I cloned
your repo with

  > git clone http://qtwork.nano.tudelft.nl/public_git/users/rwh/mplot3d

but am getting some errors with mpl svn HEAD. For example,

johnh@...539...:mplot3d> python demo.py
Traceback (most recent call last):
  File "demo.py", line 23, in ?
    line, = ax.plot3d([0.2,1.8, 2.5], [0.2,.5,3.7], [0,.5,.2], 'ro')
  File "/home/flag/johnh/tmp/mplot3d/axes3d.py", line 528, in plot3D
    lines = Axes.plot(self, xs,ys, *args, **kwargs)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py",
line 3357, in plot
    self.autoscale_view(scalex=scalex, scaley=scaley)
  File "/home/flag/johnh/tmp/mplot3d/axes3d.py", line 228, in autoscale_view
    if not self._autoscaleon: return
AttributeError: 'Axes3DI' object has no attribute '_autoscaleon'

And when I fix that (use self.get_autoscale_on()), I get the error I
referred you to earlier in this thread about the deprecated
TextWithDash

johnh@...539...:mplot3d> python demo.py
Traceback (most recent call last):
  File "demo.py", line 33, in ?
    plt.draw()
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyplot.py",
line 350, in draw
    get_current_fig_manager().canvas.draw()
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py",
line 215, in draw
    FigureCanvasAgg.draw(self)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 283, in draw
    self.figure.draw(self.renderer)
  File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/figure.py",
line 773, in draw
    for a in self.axes: a.draw(renderer)
  File "/home/flag/johnh/tmp/mplot3d/axes3d.py", line 181, in draw
    self.w_xaxis.draw(renderer)
  File "/home/flag/johnh/tmp/mplot3d/axis3d.py", line 410, in draw
    tick_update_position(tick, x,y,z, angle=angle)
  File "/home/flag/johnh/tmp/mplot3d/axis3d.py", line 102, in
tick_update_position
    tick.label1.set_dashlength(8)
AttributeError: 'Text' object has no attribute 'set_dashlength'

Have you committed your latest?

JDH

···

On Sun, Apr 12, 2009 at 6:09 PM, Reinier Heeres <reinier@...707...> wrote:

Hi,

Should be working now: I did commit and push my changes, but forgot to
update the http indices (that was a real head-breaker!).

Instead of demo.py it is nicer to try "python axes3d.py".

Hope it works!

Cheers,
Reinier

···

On Mon, Apr 13, 2009 at 6:51 PM, John Hunter <jdh2358@...149...> wrote:

On Sun, Apr 12, 2009 at 6:09 PM, Reinier Heeres <reinier@...707...> wrote:

Hi,

It took me a while to get this done, but I managed to make mplot3d
working with svn trunk again!

Hmm, this does not seem to be against svn HEAD on the trunk. I cloned
your repo with

> git clone http://qtwork.nano.tudelft.nl/public_git/users/rwh/mplot3d

but am getting some errors with mpl svn HEAD. For example,

<snip>

Have you committed your latest?

JDH

--
Reinier Heeres
Bleijenburg 64
2511 VD Den Haag
The Netherlands

Tel: +31 6 10852639

Worked beautifully -- *may thanks* for your continued work on this
port. Many folks were disappointed to see this functionality yanked
away, and it is nice to have it back. I committed it as
mpl_toolkits/mplot3d and added examples/mplot3d/demo.py. This latter
file actually does all of the demos that are in axes3d, so it is a bit
richer than the original demo.

Send me your sf id and I will add you to the committers list so you
can continue to update the software.

Thanks!
JDH

···

On Mon, Apr 13, 2009 at 5:40 PM, Reinier Heeres <reinier@...707...> wrote:

Hi,

Should be working now: I did commit and push my changes, but forgot to
update the http indices (that was a real head-breaker!).

Instead of demo.py it is nicer to try "python axes3d.py".

Hope it works!