예제 #1
0
        /// <summary>
        /// Change the default color palette for new plottables
        /// </summary>
        public Drawing.Palette Colorset(Drawing.Palette colorset = null)
        {
            if (colorset != null)
            {
                settings.PlottablePalette = colorset;
            }

            return(settings.PlottablePalette);
        }
예제 #2
0
        private ScottPlot.Plot TestColormap(ScottPlot.Drawing.Palette cset, int lineWidth, bool dark = false)
        {
            var plt = new ScottPlot.Plot(600, 400);

            for (int i = 0; i < cset.Count(); i++)
            {
                double[] ys  = DataGen.Sin(51, phase: -i / Math.PI / cset.Count());
                var      sig = plt.AddSignal(ys, color: cset.GetColor(i));
                sig.MarkerSize = 0;
                sig.LineWidth  = lineWidth;
            }

            if (dark)
            {
                plt.Style(Style.Gray1);
                plt.Style(darkColor, darkColor);
            }

            plt.Title($"Colorset '{cset.Name}' has {cset.Count()} colors");
            plt.AxisAuto(0);

            return(plt);
        }
예제 #3
0
 /// <summary>
 /// Change the default color palette for new plottables
 /// </summary>
 public void Colorset(Drawing.Palette colorset) => settings.PlottablePalette = colorset;
예제 #4
0
 /// <summary>
 /// The palette defines the default colors given to plottables when they are added
 /// </summary>
 /// <param name="palette">New palette to use (or null for no change)</param>
 /// <returns>The pallete currently in use</returns>
 public Drawing.Palette Palette(Drawing.Palette palette)
 {
     settings.PlottablePalette ??= palette;
     return(settings.PlottablePalette);
 }