Skip to content

Add xkcd style template for plotly #3438

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

Closed
RatanShreshtha opened this issue Oct 23, 2021 · 1 comment
Closed

Add xkcd style template for plotly #3438

RatanShreshtha opened this issue Oct 23, 2021 · 1 comment

Comments

@RatanShreshtha
Copy link

I have been using plotly.py for a while now and I love this library as it is a delight to use and plots are so beautiful.

I recently got know about the themes and templates in plotly.py and I wish there was one option for making plots look like xkcd comics.

import plotly.io as pio
pio.templates
Templates configuration
-----------------------
    Default template: 'plotly'
    Available templates:
        ['ggplot2', 'seaborn', 'simple_white', 'plotly',
         'plotly_white', 'plotly_dark', 'presentation', 'xgridoff',
         'ygridoff', 'gridon', 'xkcd', 'none']

And can be used in plots like below

import plotly.express as px

df = px.data.gapminder()
df_2007 = df.query("year==2007")

fig = px.scatter(df_2007,
                     x="gdpPercap", y="lifeExp", size="pop", color="continent",
                     log_x=True, size_max=60,
                     template="xkcd", title="Gapminder 2007: 'xkcd' theme")
fig.show()
@gvwilson
Copy link
Contributor

gvwilson commented Jul 3, 2024

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

@gvwilson gvwilson closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants