Skip to content

Commit

Permalink
Correct plot reference generation notebook output paths (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
ResidentMario authored Jul 5, 2019
1 parent 47ec3c7 commit 9466bc0
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions notebooks/generate-api-reference-images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
"metadata": {},
"outputs": [],
"source": [
"!mkdir ../figures/pointplot\n",
"!mkdir ../figures/kdeplot\n",
"!mkdir ../figures/polyplot\n",
"!mkdir ../figures/cartogram\n",
"!mkdir ../figures/sankey\n",
"!mkdir ../figures/choropleth\n",
"!mkdir ../figures/voronoi\n",
"!mkdir ../figures/quadtree"
"!mkdir ../docs/figures/pointplot\n",
"!mkdir ../docs/figures/kdeplot\n",
"!mkdir ../docs/figures/polyplot\n",
"!mkdir ../docs/figures/cartogram\n",
"!mkdir ../docs/figures/sankey\n",
"!mkdir ../docs/figures/choropleth\n",
"!mkdir ../docs/figures/voronoi\n",
"!mkdir ../docs/figures/quadtree"
]
},
{
Expand Down Expand Up @@ -81,7 +81,7 @@
"outputs": [],
"source": [
"gplt.pointplot(cities)\n",
"plt.savefig('../figures/pointplot/pointplot-initial.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/pointplot/pointplot-initial.png', **savefig_kwargs)"
]
},
{
Expand All @@ -91,7 +91,7 @@
"outputs": [],
"source": [
"gplt.pointplot(cities, projection=gcrs.AlbersEqualArea(), hue='ELEV_IN_FT', legend=True)\n",
"plt.savefig('../figures/pointplot/pointplot-legend.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/pointplot/pointplot-legend.png', **savefig_kwargs)"
]
},
{
Expand All @@ -106,7 +106,7 @@
" legend=True, legend_kwargs={'loc': 'upper left'},\n",
" edgecolor='lightgray', linewidth=0.5\n",
")\n",
"plt.savefig('../figures/pointplot/pointplot-kwargs.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/pointplot/pointplot-kwargs.png', **savefig_kwargs)"
]
},
{
Expand All @@ -120,7 +120,7 @@
" hue='ELEV_IN_FT', k=8, cmap='inferno_r',\n",
" legend=True\n",
")\n",
"plt.savefig('../figures/pointplot/pointplot-k.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/pointplot/pointplot-k.png', **savefig_kwargs)"
]
},
{
Expand All @@ -136,7 +136,7 @@
" hue='ELEV_IN_FT', scale='ELEV_IN_FT', limits=(1, 10), cmap='inferno_r',\n",
" legend=True, legend_var='scale'\n",
")\n",
"plt.savefig('../figures/pointplot/pointplot-scale.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/pointplot/pointplot-scale.png', **savefig_kwargs)"
]
},
{
Expand All @@ -163,7 +163,7 @@
"outputs": [],
"source": [
"gplt.polyplot(boroughs, projection=gcrs.AlbersEqualArea())\n",
"plt.savefig('../figures/polyplot/polyplot-initial.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/polyplot/polyplot-initial.png', **savefig_kwargs)"
]
},
{
Expand All @@ -180,7 +180,7 @@
" collisions[collisions['BOROUGH'].notnull()],\n",
" hue='BOROUGH', ax=ax, legend=True\n",
")\n",
"plt.savefig('../figures/polyplot/polyplot-stacked.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/polyplot/polyplot-stacked.png', **savefig_kwargs)"
]
},
{
Expand Down Expand Up @@ -208,7 +208,7 @@
"outputs": [],
"source": [
"gplt.choropleth(contiguous_usa, hue='population')\n",
"plt.savefig('../figures/choropleth/choropleth-initial.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/choropleth/choropleth-initial.png', **savefig_kwargs)"
]
},
{
Expand All @@ -221,7 +221,7 @@
" contiguous_usa, hue='population', projection=gcrs.AlbersEqualArea(),\n",
" cmap='Greens', k=5, legend=True\n",
")\n",
"plt.savefig('../figures/choropleth/choropleth-cmap.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/choropleth/choropleth-cmap.png', **savefig_kwargs)"
]
},
{
Expand All @@ -235,7 +235,7 @@
" edgecolor='white', linewidth=1,\n",
" cmap='Greens', legend=True, legend_kwargs={'loc': 'lower left'}\n",
")\n",
"plt.savefig('../figures/choropleth/choropleth-legend-kwargs.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/choropleth/choropleth-legend-kwargs.png', **savefig_kwargs)"
]
},
{
Expand All @@ -250,7 +250,7 @@
" cmap='Greens', legend=True, legend_kwargs={'loc': 'lower left'},\n",
" scheme='fisher_jenks'\n",
")\n",
"plt.savefig('../figures/choropleth/choropleth-scheme.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/choropleth/choropleth-scheme.png', **savefig_kwargs)"
]
},
{
Expand All @@ -269,7 +269,7 @@
" '12.8-25 million', '25-37 million'\n",
" ]\n",
")\n",
"plt.savefig('../figures/choropleth/choropleth-labels.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/choropleth/choropleth-labels.png', **savefig_kwargs)"
]
},
{
Expand Down Expand Up @@ -298,7 +298,7 @@
"outputs": [],
"source": [
"gplt.cartogram(contiguous_usa, scale='population', projection=gcrs.AlbersEqualArea())\n",
"plt.savefig('../figures/cartogram/cartogram-initial.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/cartogram/cartogram-initial.png', **savefig_kwargs)"
]
},
{
Expand All @@ -311,7 +311,7 @@
" contiguous_usa, scale='population', projection=gcrs.AlbersEqualArea(),\n",
" legend=True, legend_kwargs={'loc': 'lower right'}\n",
")\n",
"plt.savefig('../figures/cartogram/cartogram-trace-legend.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/cartogram/cartogram-trace-legend.png', **savefig_kwargs)"
]
},
{
Expand All @@ -326,7 +326,7 @@
" hue='population', cmap='Greens'\n",
")\n",
"gplt.polyplot(contiguous_usa, facecolor='lightgray', edgecolor='white', ax=ax)\n",
"plt.savefig('../figures/cartogram/cartogram-cmap.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/cartogram/cartogram-cmap.png', **savefig_kwargs)"
]
},
{
Expand All @@ -345,7 +345,7 @@
" ]\n",
")\n",
"gplt.polyplot(contiguous_usa, facecolor='lightgray', edgecolor='white', ax=ax)\n",
"plt.savefig('../figures/cartogram/cartogram-legend-labels.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/cartogram/cartogram-legend-labels.png', **savefig_kwargs)"
]
},
{
Expand All @@ -365,7 +365,7 @@
" limits=(0.5, 1)\n",
")\n",
"gplt.polyplot(contiguous_usa, facecolor='lightgray', edgecolor='white', ax=ax)\n",
"plt.savefig('../figures/cartogram/cartogram-limits.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/cartogram/cartogram-limits.png', **savefig_kwargs)"
]
},
{
Expand Down Expand Up @@ -395,7 +395,7 @@
"source": [
"ax = gplt.kdeplot(collisions, projection=gcrs.AlbersEqualArea())\n",
"gplt.polyplot(boroughs, ax=ax)\n",
"plt.savefig('../figures/kdeplot/kdeplot-initial.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/kdeplot/kdeplot-initial.png', **savefig_kwargs)"
]
},
{
Expand All @@ -406,7 +406,7 @@
"source": [
"ax = gplt.kdeplot(collisions, projection=gcrs.AlbersEqualArea(), n_levels=20, cmap='Reds')\n",
"gplt.polyplot(boroughs, ax=ax)\n",
"plt.savefig('../figures/kdeplot/kdeplot-shade.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/kdeplot/kdeplot-shade.png', **savefig_kwargs)"
]
},
{
Expand All @@ -421,7 +421,7 @@
" clip=boroughs\n",
")\n",
"gplt.polyplot(boroughs, ax=ax, zorder=1)\n",
"plt.savefig('../figures/kdeplot/kdeplot-clip.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/kdeplot/kdeplot-clip.png', **savefig_kwargs)"
]
},
{
Expand All @@ -436,7 +436,7 @@
" clip=boroughs.geometry\n",
")\n",
"gplt.polyplot(boroughs, ax=ax, zorder=1)\n",
"plt.savefig('../figures/kdeplot/kdeplot-shade-lowest.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/kdeplot/kdeplot-shade-lowest.png', **savefig_kwargs)"
]
},
{
Expand Down Expand Up @@ -470,7 +470,7 @@
" world, ax=ax, facecolor='lightgray', edgecolor='white'\n",
")\n",
"ax.set_global(); ax.outline_patch.set_visible(True)\n",
"plt.savefig('../figures/sankey/sankey-geospatial-context.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/sankey/sankey-geospatial-context.png', **savefig_kwargs)"
]
},
{
Expand All @@ -487,7 +487,7 @@
" world, ax=ax, facecolor='lightgray', edgecolor='white'\n",
")\n",
"ax.set_global(); ax.outline_patch.set_visible(True)\n",
"plt.savefig('../figures/sankey/sankey-cmap.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/sankey/sankey-cmap.png', **savefig_kwargs)"
]
},
{
Expand All @@ -505,7 +505,7 @@
" world, ax=ax, facecolor='lightgray', edgecolor='white'\n",
")\n",
"ax.set_global(); ax.outline_patch.set_visible(True)\n",
"plt.savefig('../figures/sankey/sankey-scale.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/sankey/sankey-scale.png', **savefig_kwargs)"
]
},
{
Expand All @@ -524,7 +524,7 @@
" world, ax=ax, facecolor='lightgray', edgecolor='white'\n",
")\n",
"ax.set_global(); ax.outline_patch.set_visible(True)\n",
"plt.savefig('../figures/sankey/sankey-legend-kwargs.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/sankey/sankey-legend-kwargs.png', **savefig_kwargs)"
]
},
{
Expand Down Expand Up @@ -562,7 +562,7 @@
"source": [
"ax = gplt.voronoi(injurious_collisions.head(1000))\n",
"gplt.polyplot(boroughs, ax=ax)\n",
"plt.savefig('../figures/voronoi/voronoi-simple.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/voronoi/voronoi-simple.png', **savefig_kwargs)"
]
},
{
Expand All @@ -576,7 +576,7 @@
" clip=boroughs.simplify(0.001), projection=gcrs.AlbersEqualArea()\n",
")\n",
"gplt.polyplot(boroughs, ax=ax)\n",
"plt.savefig('../figures/voronoi/voronoi-clip.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/voronoi/voronoi-clip.png', **savefig_kwargs)"
]
},
{
Expand All @@ -592,7 +592,7 @@
" legend=True\n",
")\n",
"gplt.polyplot(boroughs, ax=ax)\n",
"plt.savefig('../figures/voronoi/voronoi-cmap.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/voronoi/voronoi-cmap.png', **savefig_kwargs)"
]
},
{
Expand All @@ -609,7 +609,7 @@
" edgecolor='white', legend_kwargs={'loc': 'upper left'}\n",
")\n",
"gplt.polyplot(boroughs, edgecolor='black', zorder=1, ax=ax)\n",
"plt.savefig('../figures/voronoi/voronoi-kwargs.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/voronoi/voronoi-kwargs.png', **savefig_kwargs)"
]
},
{
Expand All @@ -626,7 +626,7 @@
" edgecolor='white'\n",
")\n",
"gplt.polyplot(boroughs, edgecolor='black', zorder=1, ax=ax)\n",
"plt.savefig('../figures/voronoi/voronoi-scheme.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/voronoi/voronoi-scheme.png', **savefig_kwargs)"
]
},
{
Expand All @@ -653,7 +653,7 @@
"outputs": [],
"source": [
"gplt.quadtree(collisions, nmax=1)\n",
"plt.savefig('../figures/quadtree/quadtree-initial.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/quadtree/quadtree-initial.png', **savefig_kwargs)"
]
},
{
Expand All @@ -667,7 +667,7 @@
" projection=gcrs.AlbersEqualArea(), clip=boroughs.simplify(0.001),\n",
" facecolor='lightgray', edgecolor='white'\n",
")\n",
"plt.savefig('../figures/quadtree/quadtree-clip.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/quadtree/quadtree-clip.png', **savefig_kwargs)"
]
},
{
Expand All @@ -682,7 +682,7 @@
" hue='NUMBER OF PEDESTRIANS INJURED', cmap='Reds',\n",
" edgecolor='white', legend=True\n",
")\n",
"plt.savefig('../figures/quadtree/quadtree-hue.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/quadtree/quadtree-hue.png', **savefig_kwargs)"
]
},
{
Expand All @@ -697,7 +697,7 @@
" hue='NUMBER OF PEDESTRIANS INJURED', cmap='Reds', k=None,\n",
" edgecolor='white', legend=True,\n",
")\n",
"plt.savefig('../figures/quadtree/quadtree-k.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/quadtree/quadtree-k.png', **savefig_kwargs)"
]
},
{
Expand All @@ -712,7 +712,7 @@
" hue='NUMBER OF PEDESTRIANS INJURED', cmap='Reds', agg=np.max,\n",
" edgecolor='white', legend=True, k=None\n",
")\n",
"plt.savefig('../figures/quadtree/quadtree-agg.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/quadtree/quadtree-agg.png', **savefig_kwargs)"
]
},
{
Expand All @@ -730,7 +730,7 @@
" collisions,\n",
" s=1, ax=ax\n",
")\n",
"plt.savefig('../figures/quadtree/quadtree-basemap.png', **savefig_kwargs)"
"plt.savefig('../docs/figures/quadtree/quadtree-basemap.png', **savefig_kwargs)"
]
}
],
Expand Down

0 comments on commit 9466bc0

Please sign in to comment.