Ejemplo n.º 1
0
        public BarPlotValue Function(MatrixValue Y, ScalarValue nbins)
        {
            var nn = nbins.GetIntegerOrThrowException("nbins", Name);
            var bp = new BarPlotValue();

            if (Y.IsVector)
            {
                bp.AddPoints(YMath.Histogram(Y, nn));
            }
            else
            {
                var M = new MatrixValue();

                for (var i = 1; i <= Y.DimensionX; i++)
                {
                    var N = YMath.Histogram(Y.GetColumnVector(i), nn);

                    for (var j = 1; j <= N.Length; j++)
                    {
                        M[j, i] = N[j];
                    }
                }

                bp.AddPoints(M);
            }

            return bp;
        }
Ejemplo n.º 2
0
        public BarPlotValue Function(MatrixValue Y, MatrixValue x)
        {
            var bp = new BarPlotValue();
            var X = new Double[x.Length];

            for (var i = 0; i < x.Length; i++)
            {
                X[i] = x[i + 1].Re;
            }

            if (Y.IsVector)
            {
                bp.AddPoints(YMath.Histogram(Y, X));
            }
            else
            {
                var M = new MatrixValue();

                for (var i = 1; i <= Y.DimensionX; i++)
                {
                    var N = YMath.Histogram(Y.GetColumnVector(i), X);

                    for (var j = 1; j <= N.Length; j++)
                    {
                        M[j, i] = N[j];
                    }
                }

                bp.AddPoints(M);
            }

            return bp;
        }
        public BarPlotValue Function(MatrixValue Y)
        {
            var bp = new BarPlotValue();

            bp.AddPoints(Y);
            return(bp);
        }
Ejemplo n.º 4
0
        public SumericsBarPlot(BarPlotValue plot) :
            base(plot)
        {
            var model = _model.Model;

            _plot = plot;
            model.Axes.Add(new CategoryAxis {
                Position = AxisPosition.Bottom
            });
            model.Axes.Add(new LinearAxis {
                Position = AxisPosition.Left
            });
            UpdateSeries();
            UpdateProperties();
        }
Ejemplo n.º 5
0
 public BarPlotValue Function(MatrixValue Y)
 {
     var bp = new BarPlotValue();
     bp.AddPoints(Y);
     return bp;
 }