def show_results(self):
font = {'family': 'serif',
'color': 'k',
'weight': 'normal',
'size': 12,
}
pl.plot(self.x, self.y, 'c', label='firing angle = 45°')
pl.title('The Trajectory of a Cannon Shell', fontdict = font)
pl.xlabel('x (k$m$)')
pl.ylabel('y ($km$)')
pl.xlim(0, 60)
pl.ylim(0, 20)
pl.grid(True)
pl.legend(loc='upper right', shadow=True, fontsize='large')
pl.text(34.5, 16, ' With air drag and the \n dependence of g on altitude', fontdict = font)
pl.show()
5 code 4.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录