You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The section of Matplotlib does not contain a section 2.1 and 2.3 - jumps to 2.3
In the histogram section - "First, we'll generate the data to plot. We're going to make a normal distribution with mean 5 and standard deviation 3 for 1000 points."
Perhaps adding graphing multiple graphs with matplotlib
When we run this code, we see that we can show both the sine and cosine function in one graph.
X = np.linspace(-np.pi, np.pi, 256, endpoint=True)
C,S = np.cos(X), np.sin(X)
plt.plot(X,C, "r")
plt.plot(X,S, "b")
plt.show()
With subplot you can arrange plots in a regular grid. The code below shows the cosine function on top and the sine function on the bottom.
plt.subplot(2, 1, 1)
plt.plot(X,C, "r")
plt.subplot(2, 1, 2)
plt.plot(X,S, "b")
plt.show()
Section 4 for the ggplot, state that this is based on R's gglot2.
The text was updated successfully, but these errors were encountered:
The section of Matplotlib does not contain a section 2.1 and 2.3 - jumps to 2.3
In the histogram section - "First, we'll generate the data to plot. We're going to make a normal distribution with mean 5 and standard deviation 3 for 1000 points."
Perhaps adding graphing multiple graphs with matplotlib
When we run this code, we see that we can show both the sine and cosine function in one graph.
X = np.linspace(-np.pi, np.pi, 256, endpoint=True)
C,S = np.cos(X), np.sin(X)
plt.plot(X,C, "r")
plt.plot(X,S, "b")
plt.show()
With subplot you can arrange plots in a regular grid. The code below shows the cosine function on top and the sine function on the bottom.
plt.subplot(2, 1, 1)
plt.plot(X,C, "r")
plt.subplot(2, 1, 2)
plt.plot(X,S, "b")
plt.show()
The text was updated successfully, but these errors were encountered: