From 29380b99bf76444f0fe78d5be90fb2b18e93db88 Mon Sep 17 00:00:00 2001 From: thodson-usgs Date: Thu, 13 Aug 2026 11:44:28 -0500 Subject: [PATCH] fix(demos): plot the unit-values time series off a plain frame The cell raised ``TypeError: Axes.scatter() got multiple values for argument 'x'`` and, because ``nbsphinx_allow_errors = True``, rendered that traceback on the published docs page rather than failing the build. ``get_continuous`` returns a ``GeoDataFrame``, and ``.plot()`` on one dispatches to the *geospatial* plot unless a pandas ``kind`` is given. So ``x="time"`` was carried through as a style keyword into ``ax.scatter(x, y, **kwargs)``, which already had ``x`` positionally. Subsetting to the two plotted columns yields a plain ``DataFrame`` and the pandas plot, which is what the two sibling notebooks doing the same time-series plot already do: dailyStreamflow[0][["time", "value"]].plot(x="time", y="value") data[0][["time", "value"]].plot(x="time", y="value", style=".") This one was the only one missing the subset. Verified by executing the notebook end to end against the live API. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01BTaSm7HmVb94RSJiKW4WAS --- demos/hydroshare/USGS_WaterData_UnitValues_Examples.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/hydroshare/USGS_WaterData_UnitValues_Examples.ipynb b/demos/hydroshare/USGS_WaterData_UnitValues_Examples.ipynb index 8bb61152..ca0fe808 100644 --- a/demos/hydroshare/USGS_WaterData_UnitValues_Examples.ipynb +++ b/demos/hydroshare/USGS_WaterData_UnitValues_Examples.ipynb @@ -152,7 +152,7 @@ "metadata": {}, "outputs": [], "source": [ - "ax = discharge[0].plot(x=\"time\", y=\"value\", style=\".\")\n", + "ax = discharge[0][[\"time\", \"value\"]].plot(x=\"time\", y=\"value\", style=\".\")\n", "ax.set_xlabel(\"Date\")\n", "ax.set_ylabel(\"Streamflow (cfs)\")" ]