![]() It would take a function, similar to the 'estimator' parameter in barplot, and scale the counts according to that function. Would it be worth including the code snippet above as an example in countplot? I guess I might just write some wrapper function that performs as desired, but I have to think that something like this would interest more people than just me.Įdit: Another idea might be to include something like 'scaling' as a passed parameter in countplot and factorplot. So why include countplot? This is part of what I really like about seaborn.Īnyway, It's possible that this "quality of life" handling of percentages out of the box is not worth the effort. I've only had a glance at the code for countplot and haven't fully wrapped my head around it, but am I right in my understanding that countplot is basically a special case function implementing the same underlying plotting functionality as barplot? This is what confuses me: surely it would be even more trivial to pass counts into barplot than it is to pass percentages or normalized values. But I find this line of reasoning a little strange, because of the inclusion of countplot in the first place. ![]() I can also appreciate the argument that this can be done in basically a one-liner in pandas. My inexperience with ggplot may mean that there's something important I'm missing. I posted because the ggplot inclusion of this functionality was also suggestive to me that it is of general use. ![]() I may be completely wrong in my idea that this is a reasonably generalized desire, and I'm not sure if there's a good way to find out, though this thread and stackexchange are suggestive at least. Or am I misunderstanding how you propose that normalized values are obtained?) I doubt it throws anyone for too big of a loop. (I notice that ggplot outputs these values withīut still gives normalized values on the graph. But It looks to me like having some kind of normalized rendition could be a pretty generalized need. Had I not seen the R snippet above and also stumbled across this discussion thread, I would probably not have bothered to say anything. And I can also appreciate the difficulty in finding where to draw the line for a suitably general API. And naturally it's not the only way to do it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |