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

Added a groupby argument to the histogram operation #1725

Merged
merged 2 commits into from Jul 15, 2017

Conversation

Projects
None yet
2 participants
@philippjfr
Member

philippjfr commented Jul 14, 2017

As suggested in #1716 we should have an easier way to generate a grouped/faceted histogram. The current approach is as follows:

hv.Dataset(autompg).groupby('cyl').hist(dimension='mpg', adjoin=False).overlay()

For simplicities sake I suggest adding this:

hv.Dataset(autompg).hist(dimension='mpg', groupby='cyl', adjoin=False)

OR

histogram(hv.Dataset(autompg), dimension='mpg', groupby='cyl')

bokeh_plot 90

Going to add gallery demos before this is ready to merge.

@philippjfr philippjfr added the feature label Jul 14, 2017

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jul 14, 2017

Is a nice exception raised if you try to groupby dimensions that are not available/make no sense?

@philippjfr

This comment has been minimized.

Member

philippjfr commented Jul 14, 2017

Just the usual exception raised when a dimension is not found:

KeyError: u'Dimension cylinder not found'

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jul 14, 2017

Maybe groupby should be explicitly listed as an argument of .hist so you can see this argument exists when inspecting the signature (instead of just seeing **kwargs).

@philippjfr

This comment has been minimized.

Member

philippjfr commented Jul 15, 2017

Let's merge this now, you've already opened an issue to make the .hist signatures more consistent.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jul 15, 2017

Sounds good.

@jlstevens jlstevens merged commit aff5715 into master Jul 15, 2017

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.02%) to 79.614%
Details
s3-reference-data-cache Test data is cached.
Details

@philippjfr philippjfr deleted the hist_groupby branch Jul 31, 2017

@jlstevens jlstevens added this to the 1.8.2 milestone Aug 21, 2017

@pyup-bot pyup-bot referenced this pull request Nov 3, 2017

Closed

Update holoviews to 1.9.0 #104

@pyup-bot pyup-bot referenced this pull request Nov 13, 2017

Closed

Update holoviews to 1.9.1 #120

@pyup-bot pyup-bot referenced this pull request Dec 12, 2017

Merged

Update holoviews to 1.9.2 #139

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