This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import modules | |
from matplotlib import pyplot as plt | |
# create coordinates | |
x = [1, 2, 3, 4, 5] | |
y = [1, 4, 9, 16, 25] | |
# create and display plot | |
plt.plot(x,y) | |
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import modules | |
from matplotlib import pyplot as plt | |
# create coordinates | |
x = [1, 2, 3, 4, 5] | |
y = [1, 4, 9, 16, 25] | |
# create and display plot | |
plt.plot(x,y) | |
plt.axis([1, 6, 1, 30]) # (1,1) as coordinates for origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import modules | |
from matplotlib import pyplot as plt | |
# create new coordinates | |
x = [5, 10, 20, 30, 40, 50] | |
y = [20, 10, 5, 3.3, 2.5, 2] | |
# create and display plot | |
plt.plot(x,y) | |
plt.axis([3, 55, 1, 21]) # (3,1) as coordinates for origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import modules | |
from matplotlib import pyplot as plt | |
# create coordinates | |
x = [10,20,30,40,50] | |
y = [30,30,30,30,30] | |
# create plots | |
plt.plot(x, y) | |
plt.plot(y, x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import modules | |
from matplotlib import pyplot as plt | |
from numpy import sin, cos | |
# create coordinates | |
x = [10,20,30,40,50] | |
y = [30,30,30,30,30] | |
# create plots | |
plt.plot(x, y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import modules | |
from matplotlib import pyplot as plt | |
from numpy import sin, cos | |
# create coordinates | |
x = [10,20,30,40,50] | |
y = [30,30,30,30,30] | |
# create plots with labels | |
plt.plot(x, y, 'r', label = "line 1", linestyle="-") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import the essential libraries | |
from matplotlib import pyplot as plt | |
# create the data | |
subjects = ["Mathematics", "Integrated Science", "Business Studies", "Computer Application"] | |
scores = [85, 62, 57, 92] | |
# Plot the pie plot | |
plt.pie(scores, | |
labels=subjects, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df = pd.DataFrame(data, columns = []) |
OlderNewer