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()
尋找差異