Skip to content

Instantly share code, notes, and snippets.

@chris-vecchio
Created January 15, 2019 23:03
Show Gist options
  • Save chris-vecchio/54ba4de6d38d5479f9674d1199b85ea2 to your computer and use it in GitHub Desktop.
Save chris-vecchio/54ba4de6d38d5479f9674d1199b85ea2 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"# %% scatter\n",
"N = 50\n",
"x = np.random.rand(N)\n",
"y = np.random.rand(N)\n",
"colors = np.random.rand(N)\n",
"area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radii\n",
"plt.scatter(x, y, s=area, c=colors, alpha=0.5)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"cryzen codecademy\n",
"PyDataDC"
]
}
],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment