Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/lint-mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.3.0/install.sh | sh
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
run: uv python install 3.9
- name: Install the project
run: uv sync --all-extras --dev
run: uv python install 3.11
- name: Install project dependencies (including dev deps)
run: uv sync
- name: Run mypy check
run: make mypy
8 changes: 4 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.3.0/install.sh | sh
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
run: uv python install 3.9
- name: Install the project
run: uv sync --all-extras --dev
run: uv python install 3.11
- name: Install project dependencies (including dev deps)
run: uv sync
- name: Run tests
run: uv run pytest tests --cov --cov-report=xml
- name: Upload results to Codecov
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ See [here](#all-available-options) for available options for `get_context()`!
> to avoid the generic blue-orange Matplotlib colors.
> Distinguish your plots from others!

## Supported Layouts

ICML, NeurIPS, ICLR, AISTATS, UAI, ProbML, JMLR, TMLR, A0 Poster (Landscape), A1 Poster (Portrait), 16:9 Beamer Slides, 16:9 Tuoying (Typst) Slides.

See: [this file](https://github.com/wiseodd/pub-ready-plots/blob/b7d65a9edc846335b7534680ad731d872a175681/pub_ready_plots/styles.py#L14).

## Advanced usages

### Creating a figure with multiple subplots
Expand Down
15 changes: 13 additions & 2 deletions pub_ready_plots/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

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


class Layout(Enum):
PROBML = "probml"
ICML = "icml"
NEURIPS = "neurips"
ICLR = "iclr"
Expand Down Expand Up @@ -39,6 +39,17 @@ class Style:


PAPER_FORMATS = {
Layout.PROBML: Style(
text_width=6.00117,
col_width=6.00117,
text_height=9.00177,
font_name=FONT_NAME_CM,
footnote_size=8,
script_size=7,
linewidth=1.25,
tick_size=1.5,
tick_width=0.5,
),
Layout.ICML: Style(
text_width=6.00117,
col_width=3.25063,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pub-ready-plots"
version = "1.3"
version = "1.4"
description = "Easy publication-ready matplotlib plots for ML papers and posters."
authors = [{ name = "Agustinus Kristiadi", email = "agustinus@kristia.de" }]
classifiers = [
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.