Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex does not work in labels #861

Closed
aeturrell opened this issue Aug 26, 2023 · 0 comments
Closed

Latex does not work in labels #861

aeturrell opened this issue Aug 26, 2023 · 0 comments
Assignees
Labels
Milestone

Comments

@aeturrell
Copy link

It would be great if latex worked in figure labels.

Expected behaviour is that the following would produce CO2 with the 2 in subscript (reprex follows):

from pandas_datareader import wb
from letsplot import *

LetsPlot.setup_html()

df = wb.download(
    indicator="EN.ATM.CO2E.PC",
    country=["US", "CHN", "IND", "Z4", "Z7"],
    start=2017,
    end=2017,
)
df = df.reset_index()
df = df.sort_values("EN.ATM.CO2E.PC")

(
    ggplot(df, aes(x="country", y="EN.ATM.CO2E.PC")) +
    geom_bar(aes(fill="country"), alpha=.8, stat="identity") +
    scale_fill_discrete() +
    theme_minimal() +
    theme(legend_position="none") +
    labs(
        subtitle=r"CO$_2$ (metric tons per capita)",
        title="The USA leads the world on per-capita emissions"
    )
)
@alshan alshan added this to the New milestone Sep 12, 2023
@alshan alshan modified the milestones: New, 2023Q4 Sep 29, 2023
@alshan alshan modified the milestones: 2023Q4, 2024Q1 Dec 29, 2023
@alshan alshan modified the milestones: 2024Q1, 2024Q2 Mar 29, 2024
@alshan alshan added the * label Apr 13, 2024
@alshan alshan modified the milestones: 2024Q2, 2024Q3 Jun 30, 2024
@alshan alshan modified the milestones: 2024Q3, 2024Q4 Oct 1, 2024
ASmirnov-HORIS added a commit that referenced this issue Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants