Skip to content

Commit 64f2edf

Browse files
authored
Merge pull request #31 from wiseodd/probml
Add support for ProbML template
2 parents b7d65a9 + deb4a12 commit 64f2edf

6 files changed

Lines changed: 29 additions & 12 deletions

File tree

.github/workflows/lint-mypy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
steps:
99
- uses: actions/checkout@v4
1010
- name: Set up uv
11-
run: curl -LsSf https://astral.sh/uv/0.3.0/install.sh | sh
11+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
1212
- name: Set up Python
13-
run: uv python install 3.9
14-
- name: Install the project
15-
run: uv sync --all-extras --dev
13+
run: uv python install 3.11
14+
- name: Install project dependencies (including dev deps)
15+
run: uv sync
1616
- name: Run mypy check
1717
run: make mypy

.github/workflows/pytest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
steps:
99
- uses: actions/checkout@v4
1010
- name: Set up uv
11-
run: curl -LsSf https://astral.sh/uv/0.3.0/install.sh | sh
11+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
1212
- name: Set up Python
13-
run: uv python install 3.9
14-
- name: Install the project
15-
run: uv sync --all-extras --dev
13+
run: uv python install 3.11
14+
- name: Install project dependencies (including dev deps)
15+
run: uv sync
1616
- name: Run tests
1717
run: uv run pytest tests --cov --cov-report=xml
1818
- name: Upload results to Codecov

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ See [here](#all-available-options) for available options for `get_context()`!
107107
> to avoid the generic blue-orange Matplotlib colors.
108108
> Distinguish your plots from others!
109109
110+
## Supported Layouts
111+
112+
ICML, NeurIPS, ICLR, AISTATS, UAI, ProbML, JMLR, TMLR, A0 Poster (Landscape), A1 Poster (Portrait), 16:9 Beamer Slides, 16:9 Tuoying (Typst) Slides.
113+
114+
See: [this file](https://github.com/wiseodd/pub-ready-plots/blob/b7d65a9edc846335b7534680ad731d872a175681/pub_ready_plots/styles.py#L14).
115+
110116
## Advanced usages
111117

112118
### Creating a figure with multiple subplots

pub_ready_plots/styles.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
cmfont = font_manager.FontProperties(fname=mpl.get_data_path() + "/fonts/ttf/cmr10.ttf")
88
FONT_NAME_CM = cmfont.get_name()
9-
FONT_NAME_TIMES = "Times"
9+
FONT_NAME_TIMES = "Times New Roman"
1010
FONT_NAME_ARIAL = "Arial"
11-
FONT_NAME_AVENIR = "Avenir Next Condensed"
1211

1312

1413
class Layout(Enum):
14+
PROBML = "probml"
1515
ICML = "icml"
1616
NEURIPS = "neurips"
1717
ICLR = "iclr"
@@ -39,6 +39,17 @@ class Style:
3939

4040

4141
PAPER_FORMATS = {
42+
Layout.PROBML: Style(
43+
text_width=6.00117,
44+
col_width=6.00117,
45+
text_height=9.00177,
46+
font_name=FONT_NAME_CM,
47+
footnote_size=8,
48+
script_size=7,
49+
linewidth=1.25,
50+
tick_size=1.5,
51+
tick_width=0.5,
52+
),
4253
Layout.ICML: Style(
4354
text_width=6.00117,
4455
col_width=3.25063,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pub-ready-plots"
3-
version = "1.3"
3+
version = "1.4"
44
description = "Easy publication-ready matplotlib plots for ML papers and posters."
55
authors = [{ name = "Agustinus Kristiadi", email = "agustinus@kristia.de" }]
66
classifiers = [

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)