当前位置:网站首页>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边栏推荐
- Personal blog item: processing of reading number +1 after viewing article details
- Why are keys unordered in golang map
- [high concurrency] deeply analyze the callable interface
- QT precautions and RCC download address
- Hyperledger Fabric 2. X custom smart contract
- 51 single chip microcomputer learning notes 7 -- Ultrasonic Ranging
- P5 DS - component and document Association
- Loosely matched jest A value in tohavebeencalledwith - loose match one value in jest toHaveBeenCalledWith
- Slot
- 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
猜你喜欢

Ti Click: quickly set up tidb online laboratory through browser | ti- team interview can be conducted immediately

Two houses with different colors and the farthest distance

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

What are the uses of wireless pressure collectors?

Slot

Jenkins operation Chapter 5 trigger, configuration webhook, Jenkins parameterized construction
![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
![[C language series] - initial C language (4)](/img/3b/b20d6e0194f2114f8c27a17d58369a.jpg)
[C language series] - initial C language (4)

2022 recommended high-speed rail industry research report investment strategy industry development prospect market analysis (the attachment is a link to the online disk, and the report is continuously

Pytest (7) -yield and termination function
随机推荐
ICLR is going to have a big discussion on the deep generation model. Max welling and the winner of the AAAI million dollar award are here. Bengio is one of the organizers
The generation of leetcode simple questions each character is an odd number of strings
DANGER! V** caught climbing over the wall!
Why Houdini made the pyside2 plug-in crash
Alphacode made its debut! The programming version of "Alpha dog" competed quietly and defeated half of the programmers
VLAN experiment
Week 10 - task 0- execution process instance resolution of constructors and destructors
2022-02 Microsoft vulnerability notification
3 frequently tested SQL data analysis questions (including data and code)
How to combine two byte arrays [repeat] - how to combine two byte arrays [duplicate]
2,5-di (3,4-dicarboxyphenoxy) - 4 '- phenylethynylbiphenyldianhydride (pephqda) / Qiyue custom supply porphyrin modified amphiphilic block copolymer peg113-pcl46-porphyrin
Hyperledger Fabric 2. X custom smart contract
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
JS messagechannel transport
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
β- Tetraphenyl nickel porphyrin with all chlorine substitution| β- Thiocyano tetraphenyl porphyrin copper| β- Dihydroxy tetraphenyl porphyrin 𞓜 2-nitroporphyrin | supplied by Qiyue
Boost the digital economy and face the future office | the launch of the new version of spreadjsv15.0 is about to begin
Modularization and modular specification commonjs
Mongodb paging method
Stack -- 739 Daily temperature