//Plot the Maxwell-Boltzmann distribution. The x axis should be speed and the y axis the number of particles at that speed. private void PlotDistribution() { //Delete all the previous plotted points foreach (GameObject p in plotted_points) { GameObject.Destroy(p); } plotted_points.Clear(); List <float[]> fractions = MaxwellBoltzmannSpeeds.Fractions(m, T, N, divs, vp); foreach (float[] data in fractions) { GameObject point = Instantiate(data_point_prefab); Vector3 point_position = new Vector3(graph_origin.position.x + data[1] / 25f, graph_origin.position.y + data[0] * 10000f, graph_origin.position.z); point.transform.position = point_position; plotted_points.Add(point); } }