Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add xkcd style #5992

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

Open
WeatherGod opened this issue Feb 12, 2016 · 9 comments · May be fixed by #14943 or #26854
Open

add xkcd style #5992

WeatherGod opened this issue Feb 12, 2016 · 9 comments · May be fixed by #14943 or #26854
Labels
keep Items to be ignored by the “Stale” Github Action New feature topic: rcparams

Comments

@WeatherGod
Copy link
Member

Can't believe we don't have this one already. Not perfectly trivial, as we would need a way to specify the special patheffect from the rcfile, but, essentially, this would replace plt.xkcd().

Should also look into finding an open font that we can package that matches Humor Sans.

@ghost
Copy link

ghost commented Feb 12, 2016

Comic Neue should fit that requirement.

I've been trying to figure out how to get it working on FreeBSD (and failing).

@tacaswell tacaswell added this to the unassigned milestone Feb 12, 2016
@tacaswell tacaswell added New feature Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues labels Feb 12, 2016
@souravsingh
Copy link
Contributor

I would like to work on the issue.How do I start?

@jenshnielsen
Copy link
Member

@souravsingh Awesome

I suggest having a look at the existing styles (.sty) files in https://github.com/matplotlib/matplotlib/tree/master/lib/matplotlib/mpl-data/stylelib to see how they work.

The code that defines the pyplot.xkcd is here: https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/pyplot.py#L353 so as a first step you can copy the rc params changes from there into a .sty file.

@dstansby dstansby modified the milestones: 2.1 (next point release), unassigned Feb 1, 2017
@anntzer anntzer added topic: rcparams and removed Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues labels Sep 16, 2017
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Oct 3, 2017
@anntzer anntzer linked a pull request Jul 31, 2019 that will close this issue
6 tasks
@github-actions
Copy link

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Mar 21, 2023
@rcomer
Copy link
Member

rcomer commented Mar 21, 2023

This still seems like something we should have.

@rcomer rcomer removed the status: inactive Marked by the “Stale” Github Action label Mar 21, 2023
@anntzer
Copy link
Contributor

anntzer commented Jun 26, 2023

@rcomer Perhaps we can decide whether we want to move forward with #14943 (or something along these lines) -- I don't really want to spend time arguing for it anymore. If we really don't want python style files, even restricted to matplotlib's own styles, then I think we should close this as effectively unfixable (because instantiating patheffects, even declaratively, necessarily means importing a python class and thus running arbitrary python code).

@timhoffm
Copy link
Member

timhoffm commented Jun 26, 2023

What could speak against python style files:

  • security: Users can inject arbitrary code. - IMHO there are various other ways to do this. (If it's really of concern, one could even guard this behind a flag)
  • API: With great power comes great responsibility. For public python style files we would need good instructions how to handle them.

Both aspects do not apply as long as we keep python style files internal. - I think this is a good way forward a) to provide xkcd as style and b) to learn how python style files could be used without locking in on a certain API yet.

Thus I support going forward with interal python style files. We can later decide whether we want to make this public as well.

@anntzer
Copy link
Contributor

anntzer commented Jun 26, 2023

OK, I rebased and reopened #14943, let's discuss that over there.

Copy link

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Jun 26, 2024
@story645 story645 added keep Items to be ignored by the “Stale” Github Action and removed status: inactive Marked by the “Stale” Github Action labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Items to be ignored by the “Stale” Github Action New feature topic: rcparams
Projects
None yet
9 participants