Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
MCS 275 Spring 2023 worksheet 11 Q1
创建于
3年前
差异永不过期
清除
导出
分享
解释
11 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
22 行
全部复制
14 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
22 行
全部复制
复制
已复制
复制
已复制
plt.
figure
(figsize=(8,6),dpi=120)
fig, ax =
plt.
subplots
(figsize=(8,6),dpi=120)
# 50 sample points
# 50 sample points
x = np.linspace(1, 20, 50)
x = np.linspace(1, 20, 50)
# Plot each function
# Plot each function
复制
已复制
复制
已复制
plt
.plot(x, 100*np.log(x), color="black", linewidth=1, linestyle=":", label="100*log(x)") # thin, dotted black line
ax
.plot(x, 100*np.log(x), color="black", linewidth=1, linestyle=":", label="100*log(x)") # thin, dotted black line
plt
.plot(x, 15*x, color="darkblue", marker=".", label="15*x") # dark blue, solid line AND dots
ax
.plot(x, 15*x, color="darkblue", marker=".", label="15*x") # dark blue, solid line AND dots
plt
.plot(x, 10*x*np.log(x), color="orange", label="10*x*log(x)") # orange, solid line
ax
.plot(x, 10*x*np.log(x), color="orange", label="10*x*log(x)") # orange, solid line
plt
.plot(x, x**2, color="red", linewidth=5, label="x^2") # red, thicker line
ax
.plot(x, x**2, color="red", linewidth=5, label="x^2") # red, thicker line
# Labels, title, legend
# Labels, title, legend
复制
已复制
复制
已复制
plt.
xlabel("x")
ax.set_
xlabel("x")
plt.
ylabel("Instructions executed")
ax.set_
ylabel("Instructions executed")
plt.
title("Several functions")
ax.set_
title("Several functions")
plt
.legend()
ax
.legend()
# Limits of axes
# Limits of axes
复制
已复制
复制
已复制
plt.
xlim(1,
20)
ax.set_
xlim(1,
20)
plt.
ylim(0,
600)
ax.set_
ylim(0,
600)
plt.show()
plt.show()
已保存差异
原始文本
打开文件
plt.figure(figsize=(8,6),dpi=120) # 50 sample points x = np.linspace(1, 20, 50) # Plot each function plt.plot(x, 100*np.log(x), color="black", linewidth=1, linestyle=":", label="100*log(x)") # thin, dotted black line plt.plot(x, 15*x, color="darkblue", marker=".", label="15*x") # dark blue, solid line AND dots plt.plot(x, 10*x*np.log(x), color="orange", label="10*x*log(x)") # orange, solid line plt.plot(x, x**2, color="red", linewidth=5, label="x^2") # red, thicker line # Labels, title, legend plt.xlabel("x") plt.ylabel("Instructions executed") plt.title("Several functions") plt.legend() # Limits of axes plt.xlim(1,20) plt.ylim(0,600) plt.show()
更改后文本
打开文件
fig, ax = plt.subplots(figsize=(8,6),dpi=120) # 50 sample points x = np.linspace(1, 20, 50) # Plot each function ax.plot(x, 100*np.log(x), color="black", linewidth=1, linestyle=":", label="100*log(x)") # thin, dotted black line ax.plot(x, 15*x, color="darkblue", marker=".", label="15*x") # dark blue, solid line AND dots ax.plot(x, 10*x*np.log(x), color="orange", label="10*x*log(x)") # orange, solid line ax.plot(x, x**2, color="red", linewidth=5, label="x^2") # red, thicker line # Labels, title, legend ax.set_xlabel("x") ax.set_ylabel("Instructions executed") ax.set_title("Several functions") ax.legend() # Limits of axes ax.set_xlim(1, 20) ax.set_ylim(0, 600) plt.show()
查找差异