Ejemplo n.º 1
0
        public Scatter(double[] xs, double[] ys, LineStyle ls, MarkerStyle ms)
        {
            if (xs == null || ys == null)
            {
                throw new ArgumentException("xs and ys can not be null");
            }

            if (xs.Length != ys.Length)
            {
                throw new ArgumentException("xs and ys must have the same length");
            }

            this.ls = ls;
            this.ms = ms;
            this.xs = xs;
            this.ys = ys;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Add a scatter plot
        /// </summary>
        public void Scatter(double[] xs, double[] ys, Plottables.LineStyle ls = null, Plottables.MarkerStyle ms = null)
        {
            Color color = Settings.Colors.GetColor10(plottables.Count);

            ls = ls ?? new Plottables.LineStyle(color: color);
            ms = ms ?? new Plottables.MarkerStyle(color: color);
            plottables.Add(new Plottables.Scatter(xs, ys, ls, ms));
        }