Skip to content

Commit

Permalink
Compare approaches
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Feb 3, 2024
1 parent 8925875 commit 1a7d7a5
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data/experiments.dvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
outs:
- md5: 40eb4fb20f9c7fdf3ef3088051daa83f.dir
- md5: 7d1c83659b027285e94dcb79b9ae0e4d.dir
size: 26286518
nfiles: 42
hash: md5
Expand Down
4 changes: 2 additions & 2 deletions dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,6 @@ stages:
deps:
- path: src/boilercv/stages/experiments
hash: md5
md5: a2ce03601ca0e12911bf6f001427c385.dir
size: 100496
md5: ed5dd947b8ddaa776ef49c325c1dc7ac.dir
size: 102052
nfiles: 14
11 changes: 8 additions & 3 deletions src/boilercv/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# * -------------------------------------------------------------------------------- * #
# * COMMON TO ROOT AND DVC-TRACKED DOCUMENTATION

FONT_SCALE = 1.3
"""Plot font scale."""
PRECISION = 4
"""The desired precision."""
FLOAT_SPEC = f"#.{PRECISION}g"
Expand All @@ -30,7 +32,7 @@
"""The number of rows to display in a dataframe."""


def init():
def init(font_scale: float = FONT_SCALE):
"""Initialize notebook formats."""

from boilercv.models.params import PARAMS # noqa: PLC0415
Expand All @@ -43,9 +45,12 @@ def init():
np.set_printoptions(precision=PRECISION)

sns.set_theme(
context="notebook", style="whitegrid", palette="bright", font="sans-serif"
context="notebook",
style="whitegrid",
palette="deep",
font="sans-serif",
font_scale=font_scale,
)
sns.color_palette("deep")
plt.style.use(style=PARAMS.paths.mpl_base)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"import seaborn as sns\n",
"from matplotlib import colormaps # type: ignore # pyright 1.1.333\n",
"from matplotlib.figure import Figure\n",
"from matplotlib.patches import Rectangle\n",
"from matplotlib.pyplot import subplot_mosaic, subplots\n",
"from pandas import DataFrame, read_hdf\n",
"\n",
Expand Down Expand Up @@ -238,6 +239,19 @@
" palette=palette,\n",
" data=data,\n",
")\n",
"\n",
"# Plot the original bounds\n",
"ax.add_patch(\n",
" Rectangle(\n",
" xy=(130, 240),\n",
" width=(250 - 130),\n",
" height=(460 - 240),\n",
" edgecolor=\"blue\",\n",
" facecolor=\"none\",\n",
" linewidth=2,\n",
" )\n",
")\n",
"\n",
"HIDE"
]
},
Expand Down Expand Up @@ -533,7 +547,25 @@
"HIDE\n",
"\n",
"with nowarn():\n",
" sns.move_legend(ax, \"lower center\", bbox_to_anchor=(0.5, 1), ncol=3)"
" sns.move_legend(ax, \"lower center\", bbox_to_anchor=(0.5, 1), ncol=3)\n",
"\n",
"# Define the coordinates and dimensions of the rectangle\n",
"rect_x = 0.01\n",
"rect_y = 0.2\n",
"rect_width = 0.02\n",
"rect_height = 0.6\n",
"\n",
"# Plot the original bounds\n",
"ax.add_patch(\n",
" Rectangle(\n",
" xy=(0.0002, 0.2),\n",
" width=0.003,\n",
" height=(1 - 0.2),\n",
" edgecolor=\"blue\",\n",
" facecolor=\"none\",\n",
" linewidth=2,\n",
" )\n",
")"
]
},
{
Expand Down

0 comments on commit 1a7d7a5

Please sign in to comment.