Tinyrender-Lesson 1 Bresenham’s Line Drawing Algorithm 原文:https://github.com/ssloy/tinyrenderer/wiki/Lesson-1-Bresenham%E2%80%99s-Line-Drawing-Algorit ...
Tinyrender-Lesson 0 画一个点 原文链接: https://github.com/ssloy/tinyrenderer/wiki/Lesson-0-getting-started import matplotlib.pyplot as plt from PIL import Ima ...
分类:
其他好文 时间:
2020-06-23 21:06:46
阅读次数:
70
import numpy from matplotlib import pyplot from matplotlib import animation def update_points(num): point_ani.set_data(x[num],y[num]) #更新点的位置,将这里的(x[n ...
分类:
其他好文 时间:
2020-06-23 19:05:16
阅读次数:
90
一、代码 import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_sp ...
分类:
其他好文 时间:
2020-06-22 23:30:24
阅读次数:
91
from matplotlib import pyplot as plt import matplotlib from matplotlib import font_manager font = {'family': 'Microsoft YaHei', 'weight': 'bold', 'siz ...
分类:
其他好文 时间:
2020-06-22 23:12:53
阅读次数:
51
绘制一个简单图形 让我们从一个简单的图形开始。 示例 # 以别名plt导入pyplot模块 import matplotlib.pyplot as plt # 准备数据 x = [1,2,3,4] y = [1,4,9,16] # 绘制数据 plt.plot(x, x, label='linear' ...
分类:
编程语言 时间:
2020-06-20 23:52:09
阅读次数:
69
Matplotlib 柱状图 柱状图/条形图是常见的图形类型,可使用bar()方法绘制。 示例 # 导入numpy库与matplotlib.pyplot库 import numpy as np import matplotlib.pyplot as plt # 柱状图条目 divisions = [ ...
分类:
编程语言 时间:
2020-06-20 23:47:52
阅读次数:
77
个图(figure)中可以包含多个子图(subplot)。 subplot 可以使用subplot()添加子图。 示例 创建2个子图,水平排列。 # 导入numpy库与matplotlib.pyplot库 import numpy as np import matplotlib.pyplot as ...
分类:
编程语言 时间:
2020-06-20 23:46:40
阅读次数:
65
Legend 图例 在Matplotlib中绘制多个图线时,需要在图表中说明每条曲线的含义,这时就用到了图例Legend。 使用方法 在plt.plot中添加label属性(不添加也可,但是需要在plt.legend中添加) 在plt.plot之后添加plt.legend(handles=,labe ...
分类:
其他好文 时间:
2020-06-20 21:25:56
阅读次数:
97
问题 有许多待拟合的曲线,需批量拟合。 解决 写一个类 1 # -*- coding: utf-8 -*- 2 """ 3 @author: kurrrr 4 """ 5 6 import numpy as np 7 import matplotlib.pyplot as plt 8 import ...
分类:
编程语言 时间:
2020-06-20 11:07:00
阅读次数:
61