Skip to content

Fontweight does not work? #940

@machow

Description

@machow

I tried both as an aesthetic and manual geom argument. I might be missing something, though...

(here are the matplotlib fontweight docs)

import pandas as pd
from plotnine import *

df = pd.DataFrame(
    {"x": [1, 2, 3, 4], "fontweight": ["light", "normal", "bold", "heavy"]}
)

(ggplot(df, aes(1, "x")) + geom_text(aes(label="fontweight", fontweight="fontweight")))

# same result...
(ggplot(df, aes(1, "x")) + geom_text(aes(label="fontweight"), fontweight="bold"))
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions