juanshishido / okcupid

Analyzing online self-presentation
MIT License
5 stars 0 forks source link

Fix plotting #1

Closed juanshishido closed 9 years ago

juanshishido commented 9 years ago

Currently, .plot() is called on a pd.Series resulting from .value_counts().

(tdf.ethnicity_.value_counts().sort_index() /\
 tdf.ethnicity_.value_counts().sort_index().sum()).plot(alpha=0.75,
                                                        rot=90,
                                                        figsize=(8, 6))

The issue is that, if the indices aren't the same across clusters, the y-values will be plotted in an incorrect x-axis position.

juanshishido commented 9 years ago

Try @matarhaller's histogram suggestion.