matplotlib没有显示结果

时间:2018-08-22 21:58:46

标签: python matplotlib

当我运行这个小程序(做一个小的实验以查看所选向量的线性变换)时,我的mac电脑上的python启动器图标开始通过在扩展坞上弹跳而激活,但随后没有任何显示。有什么问题吗?

import matplotlib.pyplot as plt
def linear_transformation(up_sx,up_dx,down_sx,down_dx):
    x_vect_val=(input('what is the X value of the vector?'))
    y_vect_val=(input('what is the Y value of the vector?'))
    x_vect_transfval=str((int(x_vect_val)*str(up_sx))+(int(y_vect_val)*str(up_dx)))
    y_vect_transfval=str((int(x_vect_val)*str(down_sx))+(int(y_vect_val)*str(down_dx)))
    xvals=[x_vect_val,x_vect_transfval]
    yvals=[y_vect_val,y_vect_transfval]
    plt.plot(xvals,yvals)
    plt.show

可能是我不知道的一些愚蠢原因,我是初学者

linear_transformation(1,2,0,1)

the icon activating

0 个答案:

没有答案