示例#1
0
        public void ExecuteRecipe(Plot plt)
        {
            double[] ys1   = DataGen.Sin(30);
            var      cmap1 = ScottPlot.Drawing.Colormap.Viridis;

            double[] ys2   = DataGen.Cos(30);
            var      cmap2 = ScottPlot.Drawing.Colormap.Turbo;

            for (int i = 0; i < ys1.Length; i++)
            {
                double frac = i / (ys1.Length - 1f);

                var circle = plt.AddMarker(i, ys1[i]);
                circle.MarkerShape     = MarkerShape.openCircle;
                circle.MarkerSize      = i + 5;
                circle.MarkerLineWidth = 1 + i / 2;
                circle.MarkerColor     = cmap1.GetColor(1 - frac, .8);

                var triangle = plt.AddMarker(i, ys2[i]);
                triangle.MarkerShape     = MarkerShape.openTriangleUp;
                triangle.MarkerSize      = i + 5;
                triangle.MarkerLineWidth = 1 + i / 4;
                triangle.MarkerColor     = cmap2.GetColor(frac, .8);
            }

            plt.Margins(.2, .2);
        }
示例#2
0
        public void ExecuteRecipe(Plot plt)
        {
            plt.AddSignal(DataGen.Sin(51));

            var marker = plt.AddMarker(35, 0.6);

            marker.Text               = "Interesting Point";
            marker.TextFont.Color     = Color.Magenta;
            marker.TextFont.Alignment = Alignment.UpperCenter;
            marker.TextFont.Size      = 28;
        }
示例#3
0
        public void ExecuteRecipe(Plot plt)
        {
            var    colormap = ScottPlot.Drawing.Colormap.Turbo;
            Random rand     = new(0);

            for (int i = 0; i < 100; i++)
            {
                plt.AddMarker(
                    x: rand.NextDouble(),
                    y: rand.NextDouble(),
                    size: 5 + rand.NextDouble() * 20,
                    shape: Marker.Random(rand),
                    color: colormap.RandomColor(rand));
            }
        }
示例#4
0
        public void ExecuteRecipe(Plot plt)
        {
            Random rand = new(0);

            for (int i = 0; i < 100; i++)
            {
                double x        = rand.Next(100);
                double y        = rand.Next(100);
                double fraction = rand.NextDouble();
                double size     = (fraction + .1) * 30;
                var    color    = Drawing.Colormap.Turbo.GetColor(fraction, alpha: .8);
                var    shape    = Marker.Random(rand);
                plt.AddMarker(x, y, shape, size, color);
            }
        }