代码搜索结果
找到约 11,834 项符合
Python 的代码
log_test.py
#!/usr/bin/env python
from pylab import *
dt = 0.01
t = arange(dt, 20.0, dt)
semilogx(t, exp(-t/5.0))
grid(True)
show()
fill_demo.py
#!/usr/bin/env python
from pylab import *
t = arange(0.0, 1.01, 0.01)
s = sin(2*2*pi*t)
fill(t, s*exp(-5*t), 'r')
grid(True)
show()
backend_driver.py
#!/usr/bin/env python
"""
This is used to drive many of the examples across the image backends,
for regression testing, and comparing backend efficiency
"""
from __future__ import division
import os,
subplot_toolbar.py
#!/usr/bin/env python
from pylab import *
fig = figure()
subplot(221)
imshow(rand(100,100))
subplot(222)
imshow(rand(100,100))
subplot(223)
imshow(rand(100,100))
subplot(224)
imshow(rand(100,100))
coords_report.py
#!/usr/bin/env python
# override the default reporting of coords (coords reporting not
# implemented yet on wx*)
from pylab import *
def millions(x):
return '$%1.1fM' % (x*1e-6)
x = rand(2
arctest.py
#!/usr/bin/env python
from pylab import *
def f(t):
'a damped exponential'
s1 = cos(2*pi*t)
e1 = exp(-t)
return multiply(s1,e1)
t1 = arange(0.0, 5.0, .2)
l = plot(t1, f(t1), 'ro')
text_handles.py
#!/usr/bin/env python
#Controlling the properties of axis text using handles
# See examples/text_themes.py for a more elegant, pythonic way to control
# fonts. After all, if we were slaves to matlab
fill_spiral.py
#!/usr/bin/env python
from pylab import *
theta = arange(0,8*pi,0.1)
a=1
b=.2
for dt in arange(0,2*pi,pi/2.0):
x = a*cos( theta+dt )*exp(b*theta)
y = a*sin( theta+dt )*exp(b*theta)
unicode_demo.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pylab import *
plot([1,2,4])
title( unicode('D関elopp閟 et fabriqu閟', 'latin-1') )
xlabel( unicode("r閍ctivit
py-compile
#!/bin/sh
# py-compile - Compile a Python program
# Copyright 2000, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of