Skip to content

Doc: Add thumbnails to plotting API docs #24510

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
story645 opened this issue Nov 20, 2022 · 7 comments
Open

Doc: Add thumbnails to plotting API docs #24510

story645 opened this issue Nov 20, 2022 · 7 comments

Comments

@story645
Copy link
Member

story645 commented Nov 20, 2022

@timhoffm suggested visual documentation of the plotting API via thumbnails and I think this would be a great way of addressing the 'what does this visualization library call this thing' problem for a lot of common things:

I'm not thinking of adding another gallery/index (well, yes I agree it would be nice to have a small example for every function but that's still another thing.). Rather, can we amend the current https://matplotlib.org/devdocs/api/axes_api.html by some visual "icons", e.g.

grafik

Some comments:

  • Of course, not every function can necessarily be represented (e.g. relim() would be challenging), but IMHO it would be perfectly fine not to have visuals on all of them.
  • The images can, but do not have to be generated by code. It's an illustration not a code example. I wouldn't even show the code to the end user. - Effectively this means we just embed images that we have previously created one way or the other.
  • To get this, we probably have to do some manual styling in sphinx.

Originally posted by @timhoffm in #23204 (comment)

@ramvikrams
Copy link
Contributor

I'll do it

@ramvikrams
Copy link
Contributor

ramvikrams commented Nov 27, 2022

@story645 just some follow up questions:-

  1. where can theses thumbnails be found in the repo, I actually can't find them.
  2. later today or tommorow (according to New York time) can I create a draft pr after adding 1 or 2 thumbnails, so as to you can check and I'll proceed forward after that.

@story645
Copy link
Member Author

They don't take exist (yet?) but https://github.com/matplotlib/matplotlib/tree/main/plot_types has a bunch of images that could be used for thumbnails & that's the style that @timhoffm is using in his example.

@ramvikrams
Copy link
Contributor

They don't take exist (yet?) but https://github.com/matplotlib/matplotlib/tree/main/plot_types has a bunch of images that could be used for thumbnails & that's the style that @timhoffm is using in his example.

Thanks

@story645
Copy link
Member Author

story645 commented Nov 27, 2022

  1. Starting w/ one or two examples sounds great! And please post on the incubator channel about wanting feedback so that whoever is around can help.

@ramvikrams
Copy link
Contributor

  1. Starting w/ one or two examples sounds great! And please post on the incubator channel about wanting feedback so that whoever is around can help.

That sounds great thanks

@ramvikrams
Copy link
Contributor

I actually read the whole contribution guide today, so just some questions I understood how can I have to make the thumbnails but, where do I have to write the code for the thumbnails/more precisely which file like when we go to lib/matplotlib/axes/_axes.py just this question is there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants