Skip to main content

Animation of matplotlib images

Project description

Helper functions to make animations of images with corresponding traces and labels using matplotlib

Example use:

from Animate import Animation

prepare = Prepare('a', 'b', None)
data = np.random.rand(10, 40, 20)
prepare.add_image(data, c_title='try1')
data = np.random.rand(10, 40, 20)
prepare.add_image(data, c_title='try2')
prepare.add_scale_bar(pixel_width=4)
prepare.add_scale_bar(pixel_width=8, axis=1)
prepare.add_time_label()
prepare.add_annotation(0, (3, 3), (7, 9), '123', size=13, ha='right', va='center',
                       arrowprops=dict(arrowstyle="->", color='b'), color='g')
prepare.add_circle_annotation(1, 3, 7, 3, color='b', lw=0.5, fill=False)
prepare.add_axis('Time (s)', '$\Delta$F/F')
prepare.add_trace(np.random.rand(10), 0, 'try1')
prepare.add_trace(np.random.rand(10) + 2, 0, 'try2')
prepare.add_axis('Time (s)', '$\Delta$F/F')
prepare.add_trace(np.random.rand(10), 1, 'try1')
prepare.add_trace(np.random.rand(10) + 2, 1, 'try2')
animation = Animation(prepare)
animation.save('test_sub.mp4', codec='h264')

Project details


Release history Release notifications

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

This version
History Node

0.2.1

History Node

0.2.0

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.1

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
animateimages-0.2.1.tar.gz (7.8 kB) Copy SHA256 hash SHA256 Source None Aug 12, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page