Skip to content

Commit f5c6fb5

Browse files
committed
Adjust plotting figure sizes and docs whitespace
Remove hardcoded figure sizes and DPI in plotting routines and tweak subplot width ratios for improved layout. Changes: in src/digiqual/plotting.py removed figsize=(8, 6) from plot_signal_model and plot_pod_curve and removed an inline debug comment on the xlabel; in src/digiqual/pod.py reduced the overall figsize and adjusted width_ratios (2.5 -> 2.2) and removed the explicit dpi; in docs/qs_class.qmd added minor whitespace cleanup. These edits favor default Matplotlib sizing and slightly rebalance subplot proportions for more flexible rendering.
1 parent f42d944 commit f5c6fb5

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

docs/qs_class.qmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ _ = study.pod(poi_col="Length", threshold=18.0)
121121
# | - "Signal Response Model (Physics)"
122122
# | - "Probability of Detection Curve (Reliability)"
123123
# | layout-ncol: 1
124+
125+
124126
# 2. Visualize Results
125127
study.visualise()
126128
```

src/digiqual/plotting.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def plot_signal_model(
4343
```
4444
"""
4545
if ax is None:
46-
fig, ax = plt.subplots(figsize=(8, 6))
46+
fig, ax = plt.subplots()
4747

4848
# 1. Plot Raw Data (Simulations)
4949
ax.scatter(X, y, alpha=0.5, c='grey', s=20, label='Simulation Data')
@@ -67,7 +67,7 @@ def plot_signal_model(
6767
)
6868

6969
# Formatting
70-
ax.set_xlabel(poi_name) # <--- DYNAMIC LABEL
70+
ax.set_xlabel(poi_name)
7171
ax.set_ylabel("Signal Response")
7272
ax.set_title(f"Signal Response Model ({poi_name})")
7373
ax.legend(loc='lower right')
@@ -114,7 +114,7 @@ def plot_pod_curve(
114114
115115
"""
116116
if ax is None:
117-
fig, ax = plt.subplots(figsize=(8, 6))
117+
fig, ax = plt.subplots()
118118

119119
# 1. Plot the Main PoD Curve
120120
ax.plot(X_eval, pod_curve, color='black', linewidth=2, label='PoD Estimate')

src/digiqual/pod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def plot_model_selection(cv_scores: dict) -> Any:
127127

128128
# 3. Create the Figure and subplots (Bar chart on left, Table on right)
129129
fig, (ax_plot, ax_table) = plt.subplots(
130-
1, 2, figsize=(12, 5),dpi=300, gridspec_kw={'width_ratios': [2.5, 1]}
130+
1, 2, figsize=(9, 5), gridspec_kw={'width_ratios': [2.2, 1]}
131131
)
132132

133133
# --- Bar Chart (Left) ---

0 commit comments

Comments
 (0)