Skip to content

Commit

Permalink
Use new name for matplotlib style (#198)
Browse files Browse the repository at this point in the history
* Use new name for matplotlib style
  • Loading branch information
1kastner authored Sep 19, 2023
1 parent e064efd commit 9970eef
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion conflowgen/reporting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def show_report_as_graph(self, **kwargs) -> None:
kwargs.pop("static", None)
kwargs.pop("display_as_ipython_svg", None)

with plt.style.context('seaborn-colorblind'):
with plt.style.context('seaborn-v0_8-colorblind'):
self.get_report_as_graph(**kwargs)
plt.show(block=True)

Expand Down
16 changes: 13 additions & 3 deletions docs/notebooks/analyses.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@
"database_chooser.load_existing_sqlite_database(\"demo_poc.sqlite\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1a83ad5a-1afa-468d-a254-d0137ebdf260",
"metadata": {},
"outputs": [],
"source": [
"preferred_matplotlib_style = \"seaborn-v0_8-colorblind\""
]
},
{
"cell_type": "markdown",
"id": "3a6a56f9-45ad-497d-a243-82d81130a7d7",
Expand Down Expand Up @@ -232,7 +242,7 @@
"source": [
"yard_capacity_analysis_report = conflowgen.YardCapacityAnalysisReport()\n",
"\n",
"with plt.style.context(\"seaborn-colorblind\"):\n",
"with plt.style.context(preferred_matplotlib_style):\n",
" yard_capacity_analysis_report.get_report_as_graph(\n",
" storage_requirement=conflowgen.StorageRequirement.reefer\n",
" )\n",
Expand All @@ -254,7 +264,7 @@
"metadata": {},
"outputs": [],
"source": [
"with plt.style.context(\"seaborn-colorblind\"):\n",
"with plt.style.context(preferred_matplotlib_style):\n",
" yard_capacity_analysis_report.get_report_as_graph(\n",
" storage_requirement=[\n",
" conflowgen.StorageRequirement.standard,\n",
Expand Down Expand Up @@ -310,7 +320,7 @@
"source": [
"container_dwell_time_report = conflowgen.ContainerDwellTimeAnalysisReport()\n",
"\n",
"with plt.style.context(\"seaborn-colorblind\"):\n",
"with plt.style.context(preferred_matplotlib_style):\n",
" container_dwell_time_report.get_report_as_graph(\n",
" container_delivered_by_vehicle_type={\n",
" conflowgen.ModeOfTransport.deep_sea_vessel,\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/in_spotlight.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"metadata": {},
"outputs": [],
"source": [
"plt.style.use(\"seaborn-colorblind\")"
"plt.style.use(\"seaborn-v0_8-colorblind\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/input_distributions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"metadata": {},
"outputs": [],
"source": [
"plt.style.use(\"seaborn-colorblind\")"
"plt.style.use(\"seaborn-v0_8-colorblind\")"
]
},
{
Expand Down

0 comments on commit 9970eef

Please sign in to comment.