Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
MCS 275 Spring 2023 worksheet 11 Q1
Created
3 years ago
Diff never expires
Clear
Export
Share
Explain
11 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
22 lines
Copy
14 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
22 lines
Copy
Copy
Copied
Copy
Copied
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
Copy
Copied
Copy
Copied
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
Copy
Copied
Copy
Copied
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
Copy
Copied
Copy
Copied
plt.
xlim(1,
20)
ax.set_
xlim(1,
20)
plt.
ylim(0,
600)
ax.set_
ylim(0,
600)
plt.show()
plt.show()
Saved diffs
Original text
Open file
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()
Changed text
Open file
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()
Find difference