DOC: Visualization reorganization
State: closed

Closes https://github.com/pydata/pandas/issues/6994

I still need to do one more read through. Happy to hear additional suggestions.


Labels:
name: Docs
name: Visualization
description: plotting

Comments:
I put all the random seeds in `:suppress:`ed python blocks and noted that at the top.

I expanded `doc/source/ecosystem.rst` a bit, and linked to a vis section from `visualization.rst`.

@TomAugspurger I added some comments. But really like it, good improvements!

A more general question: is it needed to put a `np.random.seed` before every random call instead of just once in the beginning of the file (as it was before I think)?

Thanks, I appreciate it.

For the random seeding we get two benefits. If someone is following along with the docs they'll be able to reproduce a specific plot exactly (without having to plot everyone up to that point so that their seed is in the same place as the docs).

Second, adding new plots that make calls to `np.random` won't change the plots later on in the docs (since they'll be bumped to the next slot in the random seed).

These are very minor benefits, but not too costly I think. The toughest part will be maintanance.

OK, this should be about ready. I changed the organization a bit, but I think it flows better now. Basically now its:
- Plot basics (`df.plot(), series.plot()`)
- Other plots (`bar`, `hist`, `scatter_matrix`, etc.)
- Formatting / Styling

Before we went from basics and mixed in a bit of styling. I think the old way of going into specifics like `x_compat` before showing how to do a bar chart isn't great. But let me know what you think.

I'd like to get https://github.com/pydata/pandas/pull/6976 in, then I'll rebase on top of that and merge this.

Ok. I rebased on top of master now that #6976 is merged, so this is ready. Let me know if you disagree with the new layout, and I'll change it back.

looks good to me, @jorisvandenbossche 

maybe throw a click reference to the controlling plot options in the Basic Plot section / intro ?

New layout seems good to me also.
- You changed the title `Plotting with matplotlib` to `Plotting Basics` (that is also the title that will appear in the docs sidebar). Now, the new name seems to suggest there is also an 'advanced' plotting section?
- maybe you could also split the 'Other plots' section in two? One on the other 'plot types/kinds' through `plot(... kind='...')` and one on the other plotting functions from `pd.tools.plotting`? Just an idea, not that important.

I had a second top level section, but I removed it so that the main sidebar would only have one plotting item. I think I'll just change `Plotting Basics` to `Plotting`.

For splitting the `other` section in two: this is what I wanted to do originally. But I like having the section with the two lists (one for `kind`s and one for `pd.tools.plotting`). I think I've got a reasonable compromise that I'll push up.

This pie plot just updated, can you use the plurals (e.g. You can create pie plots.... )

```
Pie plot

New in version 0.14.

You can create pie plot with DataFrame.plot or Series.plot with kind='pie'. If data includes NaN, it will be automatically filled by 0. If data contains negative value, ValueError will be raised.
```

I would make styling a top-level bullet

@TomAugspurger I would go ahead and merge when you are ready...

prob easier to comment after we see it built

and can always do follows

Rendered version: http://pandas-docs.github.io/pandas-docs-travis/visualization.html

- `kde` doesn't have its own section header.
- `df['b'] = df['b'] = df['b'] + np.arange(1000)` in `hexbin`, extra `df['b']`

maybe move those top 2 notes (random and ecosystem), to the end of the Basic Plotting section...

looks good!

Looking good! Thanks a lot