天池新手赛-语义分割笔记(一)
作者:互联网
# 查看当前kernel下已安装的包 list packages
!pip list --format=columns
# 安装拓展包
pip install some_package --user
# 举例:安装sklearn某依赖库
!pip install sklearn2pmml --user
# 举例:绘图案例 an example of matplotlib
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from scipy.special import jn
from IPython.display import display, clear_output
import time
x = np.linspace(0,5)
f, ax = plt.subplots()
ax.set_title("Bessel functions")
for n in range(1,10):
time.sleep(1)
ax.plot(x, jn(x,n))
clear_output(wait=True)
display(f)
# close the figure at the end, so we don't get a duplicate
# of the last plot
plt.close()
标签:plt,天池,--,语义,matplotlib,ax,import,pip,新手 来源: https://blog.csdn.net/qq_42004429/article/details/113885988