Exemplo n.º 1
0
        public void ExecuteRecipe(Plot plt)
        {
            Random rand = new Random(0);

            int[] xs = DataGen.RandomNormal(rand, 10000, 25, 10).Select(x => (int)x).ToArray();
            int[] ys = DataGen.RandomNormal(rand, 10000, 25, 10).Select(y => (int)y).ToArray();

            double[,] intensities = Tools.XYToIntensities(mode: IntensityMode.Gaussian,
                                                          xs: xs, ys: ys, width: 50, height: 50, sampleWidth: 4);

            var hm = plt.AddHeatmap(intensities);
            var cb = plt.AddColorbar(hm);
        }
Exemplo n.º 2
0
        public void ExecuteRecipe(Plot plt)
        {
            double?[,] intensities =
            {
                {    1,    7,    4, null },
                {    9, null,    2,    4 },
                {    1,    4, null,    8 },
                { null,    2,    4, null }
            };

            var hmc = plt.AddHeatmap(intensities);
            var cb  = plt.AddColorbar(hmc);
        }
Exemplo n.º 3
0
        public void ExecuteRecipe(Plot plt)
        {
            double[,] intensities = new double[100, 100];
            for (int x = 0; x < 100; x++)
            {
                for (int y = 0; y < 100; y++)
                {
                    intensities[x, y] = (Math.Sin(x * .2) + Math.Cos(y * .2)) * 100;
                }
            }

            var hm = plt.AddHeatmap(intensities, Drawing.Colormap.Turbo);
            var cb = plt.AddColorbar(hm);
        }
Exemplo n.º 4
0
        public void ExecuteRecipe(Plot plt)
        {
            double[,] imageData = DataGen.SampleImageData();
            var hm = plt.AddHeatmap(imageData, lockScales: false);

            hm.ClippingPoints = new Coordinate[]
            {
                new Coordinate(30, 15),
                new Coordinate(55, 40),
                new Coordinate(60, 45),
                new Coordinate(80, 60),
                new Coordinate(40, 95),
                new Coordinate(15, 90),
                new Coordinate(5, 50),
            };
        }
Exemplo n.º 5
0
        public void ExecuteRecipe(Plot plt)
        {
            double[,] intensities = new double[100, 100];
            for (int x = 0; x < 100; x++)
            {
                for (int y = 0; y < 100; y++)
                {
                    intensities[x, y] = (Math.Sin(x * .2) + Math.Cos(y * .2)) * 100;
                }
            }

            var hm = plt.AddHeatmap(intensities);

            hm.Update(intensities, min: 0, max: 200);

            var cb = plt.AddColorbar(hm);
        }
Exemplo n.º 6
0
        public void ExecuteRecipe(Plot plt)
        {
            int width  = 100;
            int height = 100;

            double[,] intensities = new double[width, height];

            for (int x = 0; x < width; x++)
            {
                for (int y = 0; y < height; y++)
                {
                    intensities[x, y] = (Math.Sin(x * .2) + Math.Cos(y * .2)) * 100;
                }
            }

            var hm = plt.AddHeatmap(intensities);
            var cb = plt.AddColorbar(hm);
        }
Exemplo n.º 7
0
        public void ExecuteRecipe(Plot plt)
        {
            double[,] intensities = new double[100, 100];
            for (int x = 0; x < 100; x++)
            {
                for (int y = 0; y < 100; y++)
                {
                    intensities[x, y] = (Math.Sin(x * .2) + Math.Cos(y * .2)) * 100;
                }
            }

            // scale the colors between 0 and 200
            var hm = plt.AddHeatmap(intensities);

            hm.Update(intensities, min: 0, max: 200);

            // add a colorbar with custom ticks
            var cb = plt.AddColorbar(hm);

            double[] tickPositions = ScottPlot.DataGen.Range(0, 200, 25, true);
            string[] tickLabels    = tickPositions.Select(x => x.ToString()).ToArray();
            cb.SetTicks(tickPositions, tickLabels, min: 0, max: 200);
        }
Exemplo n.º 8
0
 public void ExecuteRecipe(Plot plt)
 {
     double[,] imageData = DataGen.SampleImageData();
     plt.AddHeatmap(imageData);
 }
Exemplo n.º 9
0
 public static void PlotHeatmapImage(Plot plt, Colormap cmap)
 {
     double[,] intensities = DataGen.SampleImageData();
     plt.Clear();
     plt.AddHeatmap(intensities, cmap);
 }