Proportion (percentage) with geom_line and stat_bin ?
See original GitHub issueI see that with geom_line
and stat_bin
, I can have the y-values either as count
, ncount
, etc:
p9.geom_line(data=pd_rasters, stat='bin', bins=200, na_rm=True,
mapping=p9.aes(x='Slope', color='Algorithm', y='stat(count)'),
position='position_identity',
alpha=0.8, size=1)
Can I get this as a percentage of values (rows)? something like using y='stat(prop)'
?
I thought about a custom function as in #231 but I’m not sure how to get the total size of each group.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How do I display percentage in geom_line in ggplot2?
I am trying to display percentages in ggplot2 using geom_line and geom_point. My code is: print(ggplot(data=dfComb, aes(x=hour_adj, ...
Read more >Ex 08 Visualizing Distributions
Numerically the value can verified with the table of proportion of the states in the North Central region to be indeed round about...
Read more >Statin-prescribing trends for primary and secondary ... - NCBI
Objective. To determine the proportion of patients receiving statins for primary or secondary prevention of cardiovascular disease (CVD), as well as to describe ......
Read more >Proportion of Days Covered: Statins (PDC-STA) - Florida Blue
Star Measure: Medication Adherence Cholesterol (Statins) ... Note: The PDC is the percent of days in the measurement period covered by prescription claims....
Read more >Statins: Types, Uses and Side Effects - Cleveland Clinic
Statins are prescription drugs that help many people decrease their cholesterol level, which cuts their risk of atherosclerosis, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, did it. Please check if I did it the right way. Thanks the oppportunity to contribute
Yes
In the
result_dataframe
routine. Then add the book keeping info about it instat_bin.py
, just like the otherscount
,ndensity
, … .