Hi all,
    I' ve been using matplotlib to create some animations and it seems
that the endpoints for arrow polygon lines are being rounded off to
the nearest pixel. At least thats my guess. When viewing an animation
the arrow changes shape and distorts as it moves around. The code
below shows it on my Windows XP system where I'm using Matplotlib
0.91.1, SciPy 0.6.0, Numpy 1.0.4, Python 2.4. (The code is adapted
from examples/animation_blit_tk.py) I've also seen this on my Linux
setup when producing .png's for animation. I think I also remember
noticing circle patches having discrete movements, so it may be more
general than arrows.
    I'm wondering if other's find this to be a problem. Its
distracting in my particular case. What can I do to help change this?
I've been enjoying matplotlib along with basemap for the past two
years and would like to help out if I can.
Norm.

 - - - - - -
 import matplotlib
matplotlib.use('TkAgg')

import sys
import pylab as p
from matplotlib.patches import Arrow

ax = p.subplot(111)
canvas = ax.figure.canvas

def run(*args):
    background = canvas.copy_from_bbox(ax.bbox)

    while 1:
        canvas.restore_region(background)

        ells = [Arrow(x = i/20.+ (run.cnt+1)/16000.,
                      y = 0.4+ (run.cnt+1)/30000.,
                      dx = 0.04 + 1/200.,
                      dy = 0.06,
                      width=0.03)
            for i in xrange(10)]
        for e in ells:
            ax.add_artist(e)
        for e in ells:
            ax.draw_artist(e)

        canvas.blit(ax.bbox)

        for e in ells:
            e.remove()

        if run.cnt==1000:
            sys.exit()

        run.cnt += 1
run.cnt = 0

p.subplots_adjust(left=0.3, bottom=0.3)
p.grid()
manager = p.get_current_fig_manager()
manager.window.after(100, run)
p.show()
- - - - - -

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to