Пример #1
0
        public PlottableSignal PlotSignal(
            double[] ys,
            double sampleRate = 1,
            double xOffset    = 0,
            double yOffset    = 0,
            Color?color       = null,
            double lineWidth  = 1,
            double markerSize = 5,
            string label      = null
            )
        {
            if (color == null)
            {
                color = settings.GetNextColor();
            }

            PlottableSignal signal = new PlottableSignal(
                ys: ys,
                sampleRate: sampleRate,
                xOffset: xOffset,
                yOffset: yOffset,
                color: (Color)color,
                lineWidth: lineWidth,
                markerSize: markerSize,
                label: label,
                useParallel: settings.misc.useParallel
                );

            settings.plottables.Add(signal);
            return(signal);
        }
Пример #2
0
        /// <summary>
        /// Plot evenly-spaced data (optimized for speed)
        /// </summary>
        public void PlotSignal(double[] ys, double sampleRate = 1, double xOffset = 0, double yOffset = 0, Color?color = null, double lineWidth = 1, double markerSize = 5, string label = null)
        {
            if (color == null)
            {
                color = settings.GetNextColor();
            }
            PlottableSignal signal = new PlottableSignal(ys, sampleRate, xOffset, yOffset, (Color)color, lineWidth: lineWidth, markerSize: markerSize, label: label);

            settings.plottables.Add(signal);
        }
Пример #3
0
        public PlottableSignal PlotSignal(
            double[] ys,
            double sampleRate      = 1,
            double xOffset         = 0,
            double yOffset         = 0,
            Color?color            = null,
            double lineWidth       = 1,
            double markerSize      = 5,
            string label           = null,
            Color[] colorByDensity = null,
            int?minRenderIndex     = null,
            int?maxRenderIndex     = null,
            LineStyle lineStyle    = LineStyle.Solid,
            bool useParallel       = true
            )
        {
            if (color == null)
            {
                color = settings.GetNextColor();
            }

            if (minRenderIndex == null)
            {
                minRenderIndex = 0;
            }

            if (maxRenderIndex == null)
            {
                maxRenderIndex = ys.Length - 1;
            }

            PlottableSignal signal = new PlottableSignal(
                ys: ys,
                sampleRate: sampleRate,
                xOffset: xOffset,
                yOffset: yOffset,
                color: (Color)color,
                lineWidth: lineWidth,
                markerSize: markerSize,
                label: label,
                colorByDensity: colorByDensity,
                minRenderIndex: minRenderIndex.Value,
                maxRenderIndex: maxRenderIndex.Value,
                lineStyle: lineStyle,
                useParallel: useParallel
                );

            Add(signal);
            return(signal);
        }
Пример #4
0
        public PlottableSignal PlotSignal(
            double[] ys,
            double sampleRate      = 1,
            double xOffset         = 0,
            double yOffset         = 0,
            Color?color            = null,
            double lineWidth       = 1,
            double markerSize      = 5,
            string label           = null,
            Color[] colorByDensity = null,
            int?maxRenderIndex     = null
            )
        {
            if (color == null)
            {
                color = settings.GetNextColor();
            }

            if (maxRenderIndex == null)
            {
                maxRenderIndex = ys.Length - 1;
            }

            PlottableSignal signal = new PlottableSignal(
                ys: ys,
                sampleRate: sampleRate,
                xOffset: xOffset,
                yOffset: yOffset,
                color: (Color)color,
                lineWidth: lineWidth,
                markerSize: markerSize,
                label: label,
                useParallel: settings.misc.useParallel,
                colorByDensity: colorByDensity,
                maxRenderIndex: (int)maxRenderIndex
                );

            settings.plottables.Add(signal);
            return(signal);
        }
Пример #5
0
        public PlottableSignal PlotSignal(
            double[] ys,
            double sampleRate      = 1,
            double xOffset         = 0,
            double yOffset         = 0,
            Color?color            = null,
            double lineWidth       = 1,
            double markerSize      = 5,
            string label           = null,
            Color[] colorByDensity = null,
            int?minRenderIndex     = null,
            int?maxRenderIndex     = null,
            LineStyle lineStyle    = LineStyle.Solid,
            bool useParallel       = true
            )
        {
            PlottableSignal signal = new PlottableSignal()
            {
                ys             = ys,
                sampleRate     = sampleRate,
                xOffset        = xOffset,
                yOffset        = yOffset,
                color          = color ?? settings.GetNextColor(),
                lineWidth      = lineWidth,
                markerSize     = (float)markerSize,
                label          = label,
                colorByDensity = colorByDensity,
                minRenderIndex = minRenderIndex ?? 0,
                maxRenderIndex = maxRenderIndex ?? ys.Length - 1,
                lineStyle      = lineStyle,
                useParallel    = useParallel,
            };

            Add(signal);
            return(signal);
        }