Skip to content

Commit 87d9caa

Browse files
committed
Fix CI cross-platform failures, overhaul poster layout and chart readability
- Lazy-import matplotlib/numpy in chart_renderer to prevent ImportError on macOS/Windows CI where matplotlib is not installed - Add pytest.importorskip guard to test_chart_renderer.py so chart tests are skipped when matplotlib is unavailable - Add try/except fallback in poster_preprocessor for chart_renderer import - Increase SVG chart font sizes (tick: 24, axis: 26, legend: 22, caption: 28) and figure dimensions for poster readability - Add .chart-row CSS class for side-by-side chart layout in posters - Add SVG max-width constraint so charts scale within their grid cells - Rewrite sample_poster.md: side-by-side charts in Results, concise text, larger scale classes (removed scale-45/55/75), no content overflow - Fix overflow:hidden clipping inner content while keeping section containment - Update poster gallery screenshot
1 parent 137abf2 commit 87d9caa

6 files changed

Lines changed: 117 additions & 104 deletions

File tree

docs/screenshots/poster-sample.png

-522 KB
Loading

examples/sample_poster.md

Lines changed: 42 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ MMMMMMMMRRRRRRRRRRRREEEAAAAA
2626

2727
## I: Introduction and motivation [blue]
2828

29-
<div class="scale-80">
30-
3129
<div class="note-box" data-title="Orient your audience">
3230

33-
Start with the **broad question** your research addresses and narrow to your specific contribution in 3–5 sentences. Explain why this topic matters and what gap in current knowledge your work fills.
31+
Start with the **broad question** your research addresses and narrow to your specific contribution. Explain why this topic matters and what gap your work fills.
3432

3533
</div>
3634

@@ -49,30 +47,26 @@ Start with the **broad question** your research addresses and narrow to your spe
4947
</div>
5048
</div>
5149

52-
<div class="note-box" data-title="Research question">
53-
54-
State your specific **hypothesis** or research question. Use a figure instead of a paragraph wherever possible.
50+
<div class="note-box" data-title="Hypotheses">
5551

56-
- **Hypothesis 1**: Feature X correlates with Y
57-
- **Hypothesis 2**: Intervention Z modulates this relationship
52+
- **H1**: Feature X correlates with outcome Y
53+
- **H2**: Intervention Z modulates this relationship
5854

5955
</div>
6056

6157
<div class="note-box" data-title="Background">
6258

63-
Summarize **prior work** that motivates your study and explain how your approach advances the field.
64-
65-
</div>
59+
Prior work motivates this study; our approach advances the field by addressing key limitations in existing models.
6660

6761
</div>
6862

6963
## M: Methods [violet]
7064

71-
<div class="scale-75">
65+
<div class="scale-90">
7266

7367
<div class="definition-box" data-title="Experimental design">
7468

75-
Describe your **paradigm**: participants ($N=50$), conditions (within-subject), stimuli (naturalistic video), and procedure.
69+
**Paradigm**: $N=50$ participants, within-subject design, naturalistic video stimuli.
7670

7771
</div>
7872

@@ -88,15 +82,12 @@ Describe your **paradigm**: participants ($N=50$), conditions (within-subject),
8882

8983
<div class="definition-box" data-title="Analysis approach">
9084

91-
Describe the key statistical or computational methods. Prefer a **diagram** over dense notation.
92-
9385
- **Preprocessing**: fMRIPrep v20.2.1
9486
- **Modeling**: GLM with custom regressors
9587
- **Inference**: Non-parametric permutation tests
9688

9789
</div>
9890

99-
<div style="flex: 1; display: flex; align-items: center; justify-content: center;">
10091
<div class="emoji-figure">
10192
<div class="emoji-col">
10293
<span class="emoji emoji-xl">🐍</span>
@@ -111,38 +102,44 @@ Describe the key statistical or computational methods. Prefer a **diagram** over
111102
<span class="label">Visualization</span>
112103
</div>
113104
</div>
114-
</div>
115105

116106
</div>
117107

118108
## R: Results [green]
119109

120110
<div class="example-box" data-title="Primary finding">
121111

122-
Lead with your **most critical result**. Every figure should have a clear, self-explanatory takeaway.
123-
124-
> **Significant interaction found between Condition&nbsp;A and B** <span style="white-space:nowrap;">**($p < 0.001$).**</span>
112+
**Significant interaction** between Condition A and B ($p < 0.001$).
125113

126114
</div>
127115

116+
<div class="chart-row">
117+
128118
```chart
129119
type: bar
130120
labels: Condition A, Condition B, Control
131121
data: 0.89, 0.72, 0.65
132122
ylabel: Accuracy
133-
caption: Figure 1. Accuracy by experimental condition
134-
height: 220px
123+
caption: Accuracy by condition
135124
```
136125

137-
<div style="text-align: center; white-space: nowrap;">
138-
139-
$$\hat{y} = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon, \quad R^2 = 0.73$$
126+
```chart
127+
type: bar
128+
labels: Condition A, Condition B, Control
129+
datasets:
130+
- label: Accuracy
131+
data: 0.89, 0.72, 0.65
132+
- label: F1 score
133+
data: 0.85, 0.68, 0.60
134+
ylabel: Score
135+
caption: Accuracy and F1 by condition
136+
```
140137

141138
</div>
142139

143-
<div class="example-box" data-title="Supporting evidence">
140+
<div style="text-align: center; white-space: nowrap;">
144141

145-
Use tables for quantitative comparisons across conditions:
142+
$$\hat{y} = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon, \quad R^2 = 0.73$$
146143

147144
</div>
148145

@@ -154,7 +151,7 @@ Use tables for quantitative comparisons across conditions:
154151

155152
<div class="example-box" data-title="Generalization">
156153

157-
Show that findings **replicate** across datasets or participant groups to strengthen impact.
154+
Findings **replicate** across datasets and participant groups.
158155

159156
</div>
160157

@@ -170,50 +167,32 @@ datasets:
170167
data: 0.71, 0.74, 0.70, 0.75, 0.73
171168
xlabel: Cross-validation fold
172169
ylabel: F1 score
173-
caption: Figure 2. Generalization across datasets
174-
height: 220px
175-
```
176-
177-
```chart
178-
type: bar
179-
labels: Condition A, Condition B, Control
180-
datasets:
181-
- label: Accuracy
182-
data: 0.89, 0.72, 0.65
183-
- label: F1 score
184-
data: 0.85, 0.68, 0.60
185-
caption: Figure 1. Accuracy and F1 scores across experimental conditions
186-
height: 250px
170+
caption: Generalization across datasets
187171
```
188172

189-
<div class="example-box" data-title="Robustness check">
173+
<div class="example-box" data-title="Robustness">
190174

191-
We verified our results using cross-validation <span style="white-space:nowrap;">(k&nbsp;=&nbsp;5)</span> and bootstrap resampling <span style="white-space:nowrap;">(1000 iterations).</span> The effect size remains stable <span style="white-space:nowrap;">(Cohen's d&nbsp;=&nbsp;0.8).</span> Sensitivity analyses confirm that results hold across a range of preprocessing choices and model specifications. Permutation testing corroborates significance under non-parametric assumptions <span style="white-space:nowrap;">(BF&nbsp;>&nbsp;10).</span>
175+
Cross-validation (k=5) and bootstrap resampling (1000 iterations) confirm stable effect size (Cohen's d = 0.8). Permutation testing corroborates significance (BF > 10).
192176

193177
</div>
194178

195-
196179
## D: Discussion [teal]
197180

198-
<div class="scale-75">
181+
<div class="scale-80">
199182

200183
<div class="tip-box" data-title="Key takeaways">
201184

202-
Summarize your **main findings** and connect them back to the original research question.
203-
204-
- **Finding 1**: Model outperforms baseline by 15%, supporting Hypothesis 1.
205-
- **Finding 2**: Effect is robust to parameter variations and generalizes across datasets.
206-
- **Finding 3**: Results suggest a new cognitive control mechanism consistent with prior theoretical accounts.
185+
- **Finding 1**: Model outperforms baseline by 15%, supporting H1
186+
- **Finding 2**: Effect is robust across parameter variations
187+
- **Finding 3**: Results suggest a new cognitive control mechanism
207188

208189
</div>
209190

210191
<div class="tip-box" data-title="Implications">
211192

212-
Explain **why these findings matter** for the broader field.
213-
214-
- Provides evidence for predictive coding frameworks in perception.
215-
- Challenges existing models that assume static representations.
216-
- Opens new avenues for computational psychiatry applications.
193+
- Evidence for predictive coding frameworks in perception
194+
- Challenges models assuming static representations
195+
- Opens avenues for computational psychiatry
217196

218197
</div>
219198

@@ -225,26 +204,21 @@ datasets:
225204
data: 88, 72, 65, 80, 90
226205
- label: Next steps
227206
data: 93, 85, 80, 88, 92
228-
caption: Figure 3. Current capabilities vs. planned improvements
229-
height: 220px
207+
caption: Current capabilities vs. planned improvements
230208
```
231209

232210
<div class="tip-box" data-title="Limitations and future work">
233211

234-
Acknowledge **limitations** honestly and describe planned follow-ups.
235-
236-
- Sample limited to college-age participants; generalization needed.
237-
- Future work: longitudinal designs, larger and more diverse cohorts.
212+
- Sample limited to college-age participants
213+
- Future: longitudinal designs, larger cohorts
238214

239215
</div>
240216

241217
</div>
242218

243219
## E: References [orange]
244220

245-
<div class="scale-45">
246-
247-
<div class="warning-box" data-title="">
221+
<div class="scale-60">
248222

249223
1. Author A *et al.* (2023). *J. Neurosci.*
250224
2. Author C *et al.* (2022). *Nat. Hum. Behav.*
@@ -254,22 +228,12 @@ Acknowledge **limitations** honestly and describe planned follow-ups.
254228

255229
</div>
256230

257-
</div>
258-
259231
## A: Acknowledgments [spring]
260232

261-
<div class="scale-55">
262-
263-
<div class="tip-box" data-title="Funding and links">
233+
<div class="scale-65">
264234

265-
**NSF EPSCoR** #1632738
266-
**NIH R01** MH112357
267-
**NSF CAREER** #1849109
235+
**NSF EPSCoR** #1632738 · **NIH R01** MH112357 · **NSF CAREER** #1849109
268236

269-
🌐 context-lab.com
270-
💻 github.com/ContextLab
271-
📂 osf.io/example
272-
273-
</div>
237+
🌐 context-lab.com · 💻 github.com/ContextLab
274238

275239
</div>

src/cdl_slides/assets/themes/cdl-poster-theme.css

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,16 @@ table th {
226226
min-height: 0;
227227
display: flex;
228228
flex-direction: column;
229-
justify-content: center;
230-
overflow: hidden;
229+
justify-content: flex-start;
230+
overflow: visible;
231231
}
232232

233233
.poster-section > div[class*="scale-"] {
234234
flex: 1;
235235
min-height: 0;
236236
display: flex;
237237
flex-direction: column;
238-
overflow: hidden;
238+
overflow: visible;
239239
}
240240

241241
.poster-section > div[class*="scale-"] > .note-box:only-child,
@@ -249,7 +249,26 @@ table th {
249249
flex-direction: column;
250250
justify-content: center;
251251
min-height: 0;
252-
overflow: hidden;
252+
overflow: visible;
253+
}
254+
255+
.chart-row {
256+
display: flex;
257+
gap: 4mm;
258+
align-items: flex-start;
259+
justify-content: center;
260+
width: 100%;
261+
}
262+
263+
.chart-row > div {
264+
flex: 1;
265+
min-width: 0;
266+
}
267+
268+
/* Ensure SVG charts scale to fit their container */
269+
.poster-section svg {
270+
max-width: 100%;
271+
height: auto;
253272
}
254273

255274
.poster-title {

0 commit comments

Comments
 (0)