⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 text_handles.py

📁 非原创。很好的python例子
💻 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(TM) , we wouldn't be# using python!from pylab import *def f(t):    s1 = sin(2*pi*t)    e1 = exp(-t)    return multiply(s1,e1)t1 = arange(0.0, 5.0, 0.1)t2 = arange(0.0, 5.0, 0.02)subplot(111)plot(t1, f(t1), 'bo', t2, f(t2), 'k')text(3.0, 0.6, 'f(t) = exp(-t) sin(2 pi t)')ttext = title('Fun with text!')ytext = ylabel('Damped oscillation')xtext = xlabel('time (s)')setp(ttext, size='large', color='r', style='italic')setp(xtext, size='medium', name='courier', weight='bold', color='g')setp(ytext, size='medium', name='helvetica', weight='light', color='b')show()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -