Jump to content
新域网络技术论坛

Search the Community

Showing results for tags '算法'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 论坛服务
    • 公告栏
  • 技术讨论
    • IPB相关讨论
    • PHP技术探讨
    • FREEBSD讨论
    • 其它技术
    • 软件分享
  • 业余无线电
    • 使用指南
    • 设备讨论

Blogs

There are no results to display.

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


位置


兴趣


呼号

Found 1 result

  1. 由于系统没字体,所以没使用中文的title # -*- coding: UTF-8 -*- import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties x = [[0], [1], [2]] y = [[0], [1], [2]] if ((x[0][0] == x[1][0] and x[0][0] == x[2][0]) or (y[0][0] == y[1][0] and y[0][0] == y[2][0]) or ((x[0][0]-x[1][0])/(y[0][0]-y[1][0]) == (x[0][0]-x[2][0])/(y[0][0]-y[2][0]))): online = True else: online = False #title = u'三点是否在一条直线上?:'+str(online) title = 'Is the three point in a straight line? '+str(online) plt.figure() plt.title(title) plt.xlabel('x') plt.ylabel('y') plt.axis([-2, 10, -2, 10]) plt.grid(True) plt.plot(x, y, 'k.') plt.plot(x, y, 'g-') plt.show()
×
×
  • Create New...