Exemple #1
0
        public PlottableHeatmap PlotHeatmap(
            double[,] intensities,
            Drawing.Colormap colormap = null,
            string label                 = null,
            double[] axisOffsets         = null,
            double[] axisMultipliers     = null,
            double?scaleMin              = null,
            double?scaleMax              = null,
            double?transparencyThreshold = null,
            Bitmap backgroundImage       = null,
            bool displayImageAbove       = false,
            bool drawAxisLabels          = true
            )
        {
            if (colormap == null)
            {
                colormap = Drawing.Colormap.Viridis;
            }

            if (axisOffsets == null)
            {
                axisOffsets = new double[] { 0, 0 }
            }
            ;

            if (axisMultipliers == null)
            {
                axisMultipliers = new double[] { 1, 1 }
            }
            ;

            PlottableHeatmap heatmap = new PlottableHeatmap(intensities, colormap, label, axisOffsets, axisMultipliers, scaleMin, scaleMax, transparencyThreshold, backgroundImage, displayImageAbove, drawAxisLabels);

            Add(heatmap);
            MatchAxis(this);
            Ticks(false, false);
            Layout(y2LabelWidth: 180);

            return(heatmap);
        }
    }
}
        public PlottableHeatmap PlotHeatmap(
            double[,] intensities,
            Drawing.Colormap colormap = null,
            string label                 = null,
            double[] axisOffsets         = null,
            double[] axisMultipliers     = null,
            double?scaleMin              = null,
            double?scaleMax              = null,
            double?transparencyThreshold = null,
            Bitmap backgroundImage       = null,
            bool displayImageAbove       = false,
            bool drawAxisLabels          = true
            )
        {
            PlottableHeatmap heatmap = new PlottableHeatmap()
            {
                label                 = label,
                AxisOffsets           = axisOffsets ?? new double[] { 0, 0 },
                AxisMultipliers       = axisMultipliers ?? new double[] { 1, 1 },
                ScaleMin              = scaleMin,
                ScaleMax              = scaleMax,
                TransparencyThreshold = transparencyThreshold,
                BackgroundImage       = backgroundImage,
                DisplayImageAbove     = displayImageAbove,
                ShowAxisLabels        = drawAxisLabels,
                Colormap              = colormap ?? Drawing.Colormap.Viridis
            };

            heatmap.UpdateData(intensities);

            Add(heatmap);
            MatchAxis(this);
            Ticks(false, false);
            Layout(y2LabelWidth: 180);

            return(heatmap);
        }