当前位置:网站首页>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边栏推荐
- 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
- Longest substring between two identical characters of leetcode simple question
- Difference between static and final
- Analysis report on the investment market of the development planning prospect of the recommended wind power industry research industry in 2022 (the attachment is a link to the network disk, and the re
- Call the computer calculator and use it to convert several base numbers
- The win11 file resource manager has an explicit Caton, and Microsoft promises to improve the performance in 2022
- Can use the mouse, will reinstall the computer system tutorial sharing
- Openfpga wishes you a happy Lantern Festival!
- 3 frequently tested SQL data analysis questions (including data and code)
- 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
猜你喜欢

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

JS messagechannel transport

QT writing map comprehensive application 58 compatible with multi browser kernel

5- (4-benzoimide phenyl) - 10,15,20-triphenylporphyrin (battph2) and its Zn complex (battpzn) / tetra (4-aminophenyl) porphyrin (tapph2) Qiyue supply

Problems with MySQL database query

β- Tetraphenyl nickel porphyrin with all chlorine substitution| β- Thiocyano tetraphenyl porphyrin copper| β- Dihydroxy tetraphenyl porphyrin 𞓜 2-nitroporphyrin | supplied by Qiyue

2022 recommended REITs Industry Research Report investment strategy industry development prospect market analysis (the attachment is a link to the online disk, and the report is continuously updated)

Testing grpc service with grpcui

Difference between parametric continuity and geometric continuity

Conditional test, if and case conditional test statements of shell script
随机推荐
Difference between parametric continuity and geometric continuity
Conditional test, if and case conditional test statements of shell script
Can redis implement hot standby?
Design and practice of kubernetes cluster and application monitoring scheme
Difference between URI and URL
2022.02.15
[chromium] win10 vs2019 environment chromium configuration and compilation.
QT writing map comprehensive application 58 compatible with multi browser kernel
Signal slot mechanism
2022 community group buying industry research industry development planning prospect investment market analysis report (the attachment is the online disk link, and the report is continuously updated)
Regular expressions for shell script values
Week 10 - task 1- fill in the blank: line class inherits point class
Observer mode vs publish subscribe mode
2022 recommended tire industry research report industry development prospect market analysis white paper
Leetcode simple problem building arrays with stack operation
What has urbanization brought to our mental health and behavior?
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
What is the "danksharding" of V God Kop on Valentine's day?
SCM engineering experience - time slice
DataX connection MySQL cannot find driver