From 9466bc0bd154e290d9b39302e88d1a79de15c603 Mon Sep 17 00:00:00 2001 From: Aleksey Bilogur Date: Fri, 5 Jul 2019 11:34:16 -0400 Subject: [PATCH] Correct plot reference generation notebook output paths (#143) --- notebooks/generate-api-reference-images.ipynb | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/notebooks/generate-api-reference-images.ipynb b/notebooks/generate-api-reference-images.ipynb index 26d85ce3..c2dab16c 100644 --- a/notebooks/generate-api-reference-images.ipynb +++ b/notebooks/generate-api-reference-images.ipynb @@ -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" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] }, { @@ -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)" ] } ],