Created
December 19, 2018 16:24
-
-
Save RyotaBannai/7f8104791d2ee16fd7b51de66c0ae59f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ax = plt.gca() | |
| ax.set_xlabel('X'); ax.set_ylabel('Y') | |
| plt.scatter(X_raw[:, 0], X_raw[:, 1], c='#B8860B', alpha=0.5) | |
| plt.scatter(X_mean[0], X_mean[1], c='red', s=50) | |
| plt.axis('equal') | |
| for length, vector in zip(e_values, V): | |
| dir_ = -vector * 3 * np.sqrt(length) # Tweak the sign | |
| start = X_mean; end = start + dir_ | |
| arrowprops = dict(arrowstyle='->',linewidth=2, | |
| shrinkA=0, shrinkB=0, color='red', alpha=0.5) | |
| ax.annotate('', xy=end, xytext=start, arrowprops=arrowprops) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment