当前位置:网站首页>Overlay histogram with density curve
Overlay histogram with density curve
2022-06-29 06:15:00 【javail】
problem :
I am trying to make a histogram of density values and overlay that with the curve of a density function (not the density estimate). I am trying to make a histogram of the density value and compare it with the curve of the density function ( Not density estimates ) superposition .
Using a simple standard normal example, here is some data: Use a simple standard normal example , Here are some data :
x <- rnorm(1000)I can do: I can :
q <- qplot( x, geom="histogram")q + stat_function( fun = dnorm )but this gives the scale of the histogram in frequencies and not densities. But this gives the frequency of the histogram, not the proportion of the density .with ..density.. I can get the proper scale on the histogram: And ..density.. I can get the appropriate scale on the histogram :
q <- qplot( x,..density.., geom="histogram")qBut now this gives an error: But now this gives an error :
q + stat_function( fun = dnorm )Is there something I am not seeing? Is there anything I haven't seen ?
Another question, is there a way to plot the curve of a function, like curve() , but then not as layer? Another question , Is there any way to plot the curve of a function , such as curve() , But not as a layer ?
Solution :
Reference resources : https://stackoom.com/en/question/NrjG边栏推荐
- How to use regex in file find
- Design and practice of kubernetes cluster and application monitoring scheme
- Agile invincible event
- SCM engineering experience - time slice
- Installing modules in pycharm
- Programming specification and variables of shell script
- Multiline regular expression search in Visual Studio code - multiline regular expression search in Visual Studio code
- 5,10-di (4-aminophenyl) - 15,20-diphenylporphyrin (cis-dadph2) /5,15-di (4-aminophenyl) - 10,20-diphenylporphyrin (trans-dadph2) / (tri-apph2) supplied by Qiyue
- 2,5-di (3,4-dicarboxyphenoxy) - 4 '- phenylethynylbiphenyldianhydride (pephqda) / Qiyue custom supply porphyrin modified amphiphilic block copolymer peg113-pcl46-porphyrin
- 2022-01 Microsoft vulnerability notification
猜你喜欢

It turns out that the joys and sorrows of programmers are not interlinked

Modularization and modular specification commonjs

2022 recommended quantum industry research industry development planning prospect investment market analysis report (the attachment is a link to the online disk, and the report is continuously updated

Quickly write MVVM code using source generators
![ASP. Net core 6 framework unveiling example demonstration [03]:dapr initial experience](/img/fd/4c24e10fc91a7ce7e709a0874ba675.jpg)
ASP. Net core 6 framework unveiling example demonstration [03]:dapr initial experience

Why can't the article be posted?
![[deep learning] - maze task learning I (to realize the random movement of agents)](/img/c1/95b476ec62436a35d418754e4b11dc.jpg)
[deep learning] - maze task learning I (to realize the random movement of agents)

Hyperledger Fabric 2. X custom smart contract

Programming specification and variables of shell script

Sum of digits under k-ary representation of leetcode simple problem
随机推荐
Alphacode made its debut! The programming version of "Alpha dog" competed quietly and defeated half of the programmers
JS messagechannel transport
Parsing rshub document auto generation API
Internet enterprises need CRM software to help
3 frequently tested SQL data analysis questions (including data and code)
Design of leetcode simple problem goal parser
What are the uses of final?
Difference between static and final
What if the hard disk fails to recognize how to recover data
Research Report on the recommended lithography industry in 2022 industry development prospect market investment analysis (the attachment is a link to the network disk, and the report is continuously u
MySQL add / delete / modify query SQL statement exercise yyds dry goods inventory
Benign competition will promote each other
The first commercial spacewalk of mankind is finalized! Musk SpaceX announced a new round of space travel plan, and the American rich became repeat customers
ES6 Modularization: export /import
Pytest (7) -yield and termination function
National Defense University project summary
Can use the mouse, will reinstall the computer system tutorial sharing
How to hand over complex legacy systems?
Analysis report on the investment market situation of the development planning prospect of the recommended chip industry research industry in 2022 (the attachment is a link to the network disk, and th
VLAN experiment