简体   繁体   中英

bell curve using flot

I have implemented a bell curve from the below link : Create Normal Distribution (Bell Curve) chart using FLOT

How to put the Lines on the Bell curve like the image : 在此处输入图片说明

Based on a comment in the question you linked, you can use markings to achieve this (see this fiddle ):

带有标记的钟形曲线

The relevant code:

var markings = [];
for (var i= -2; i <= 2; i+= 1) {
    markings.push({ xaxis: { from: i, to: i }, yaxis: { from: 0, to: NormalDensityZx(i,0,1) }, color: "#bb0000" });
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM