Skip to content

Create new sphinx gallery page for "Chart Types" #18277

Closed

Description

@story645

Problem

Matplotlib supports give or take around 60 unique chart types, but there's no distinct listing of these charts. The closest is a listing of all methods on Axes (https://matplotlib.org/api/axes_api.html?highlight=axes#basic) which intermixes other functionality. It's even harder to find the distinct chart types in the gallery, where there are roughly 600? examples.

Proposal

A new stand-alone sphinx gallery page where each plot type gets a minimal example of the form:

data = np.array([list of concrete values])
fig, ax = plt.subplots()
ax.plotting_method(data)

no generated data, no tweaking of the parameters in the plot, just an out of the box this is what this plotting method does. intention is to manage issue via https://github.com/matplotlib/matplotlib/projects/10 by

  1. creating notes for each plot type
  2. replacing with PRs as folks tackle them.

Optional

Create a placeholder folder in the docs for PRs to target these examples so they're not waiting on the new gallery page.

Activity

  1. timhoffm commented on Aug 18, 2020

    @timhoffm
    Member
  2. story645 commented on Aug 18, 2020

    @story645
    MemberAuthor

    Page - the goal is easily discoverable/scannable, with distinct curation criteria on the examples. I'm worried that putting it into the existing gallery is a recipe for making it hard to find and ending up w/ examples that are trying to do more. And like yes maybe long term the chart type examples will grow into narrative style here's all the ways you can go w/ this one plot type - but that's more of a reason for me to have a standalone this is the one thing it does page.

  3. QuLogic commented on Aug 18, 2020

    @QuLogic
    Member

    I think something like the seaborn gallery would be the aim; a short and concise set of images that show the individual types of plots and only those (though admittedly, seaborn's does have a few duplicates.)

  4. timhoffm commented on Aug 18, 2020

    @timhoffm
    Member

    i have no strong opinion on page vs. section. If we go with page though, we should start to think more about site structure and navigation. I would not be particularly happy about adding another element "Chart Types" to the main navigation menu. That's going to feel cluttered.

  5. story645 commented on Aug 19, 2020

    @story645
    MemberAuthor

    Yeah I think as a first pass probably something that gets linked off the gallery page or gallery becomes a drop down.

  6. rajpratyush commented on Mar 12, 2021

    @rajpratyush
    Contributor

    I put up a change though we should can add code snippets for each plots , a more detailed description to the plots rather than one or 2 lines, along with plots and a link to a more descriptive plots where they can learn how to change the looking of the plot( some thing like changing colors, legends, and modifying the default settings of the plots, etc.)

  7. story645 commented on Mar 12, 2021

    @story645
    MemberAuthor

    So I'm not opposed to that, but in terms of priorities I'd rather a short pass through of every single chart & then fleshing out each chart. My concern is starting at fleshing out is gonna lead to long entries for scatter, line, bar, and heat, for which there are already many resources...and then none of the rest of the charts will be addressed.

  8. jklymak commented on Mar 12, 2021

    @jklymak
    Member

    I think the thing to keep in mind is that there are not really 60 plot types. There are really about 17, and then there are a bunch of derivatives/bespoke charts, and annotations. A 4x4 or 4x5 gallery of all of these would be great, particularly if each one referenced the larger set of examples in the gallery. Some of the ones below could definitely be combined into one "example"

    basic:

    • plot
      • plot_date
      • loglog, semilogx, semilogy
      • fill_between/x
      • stackplot
    • scatter
      • errorbar
    • bar
      • barh/brokenbarh
    • stem
    • pie

    Stats:

    • boxplot
    • violinplot
    • hist
      • steps
    • hist2d
    • hexbin

    Arrays

    • imshow
      • matshow
      • spy
    • pcolormesh
      • pcolor/pcolorfast
    • contour/f

    Fields

    • quiver/barbs
    • streamplot

    Unstructured

    • tripcolor
    • triplot
    • tricontour/f
  9. story645 commented on Mar 14, 2021

    @story645
    MemberAuthor

    So the only reason I don't want to combine the sub things into one example is that it makes them undiscovereble - but maybe the way around that is to have the header image be a multipanel w/ all the subtypes...

    Also the fillbetween and stack plot are both types of area charts...

  10. jklymak commented on Mar 14, 2021

    @jklymak
    Member

    I guess the question is if the point is to be comprehensive or an overview. We can always link to more detail.

  11. rajpratyush commented on Mar 14, 2021

    @rajpratyush
    Contributor

    So I'm not opposed to that, but in terms of priorities I'd rather a short pass through of every single chart & then fleshing out each chart. My concern is starting at fleshing out is gonna lead to long entries for scatter, line, bar, and heat, for which there are already many resources...and then none of the rest of the charts will be addressed.

    @story645 well I am just against the one line description I wish it could be little more descriptive like 3 to 4 lines

  12. story645 commented on Mar 14, 2021

    @story645
    MemberAuthor

    @jklymak my motivation for this was the excel chart type menu, which I think combines your "group all the plot type things together" with then underneath an entry for each option they offer.
    image

    @rajpratyush to be clearer, the one line isn't a strict limit. If you think it needs more, I'm not opposed to that. Is more that my goal w/ these docs on a first pass is to be a quick gallery of chart types.

    https://www.python-graph-gallery.com/ is another example of what I want, very specific to the chart types in matplotlib.

  13. rajpratyush commented on Mar 14, 2021

    @rajpratyush
    Contributor

    @story645 how about stacking them together as @jklymak said in columns with 2-3 lines description and a code snippet to reproduce as well as a hyperlink mentioning more details can be found here

  14. story645 commented on Mar 14, 2021

    @story645
    MemberAuthor

    That might work. I think you should try it, and lets see. If it ends up too cluttered, I don't think it'll be too much work to break it out into a main gallery->subgalleries structure.

  15. rajpratyush commented on Mar 14, 2021

    @rajpratyush
    Contributor

    surely @story645

  16. added this to the v3.5.0 milestone on Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions