Menu

[r540]: / trunk / htdocs / examples / logo.py  Maximize  Restore  History

Download this file

25 lines (22 with data), 644 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
# This file generates the matplotlib web page logo
from matplotlib.matlab import *
# convert data to mV
x = 1000*0.1*fromstring(
file('data/membrane.dat', 'rb').read(), Float32)
# 0.0005 is the sample interval
t = 0.0005*arange(len(x))
figure(1, figsize=(7,1), dpi=100)
ax = subplot(111, axisbg='y')
plot(t, x)
text(0.5, 0.5,'matplotlib', color='r',
fontsize=40, fontname='Courier',
horizontalalignment='center',
verticalalignment='center',
transform = ax.transAxes,
)
axis([1, 1.72,-60, 10])
set(gca(), 'xticklabels', [])
set(gca(), 'yticklabels', [])
#savefig('logo2.png', dpi=300)
show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.