Tag Archives: histogram

Draw a picture-filled histogram in C#

The example Make a simple histogram in C# shows how to draw a histogram. This example shows how to fill the histogram’s bars with pictures. The following TileRectangle method fills a rectangle with an image. // Tile an area from … Continue reading

Posted in drawing, graphics, mathematics | Tagged , , , , , , , , , , , , | Leave a comment

Make a simple histogram in C#

This example displays a histogram showing the distribution of random values that simulate rolling two 6-sided dice. At design time I gave the program’s form two groups of Label controls across the bottom of the form. The bottommost group displays … Continue reading

Posted in algorithms, controls, graphics, mathematics | Tagged , , , , , , , , , , , , | 1 Comment

Draw a histogram with tooltips in C#

The example Draw a simple histogram in C# explains how to draw a simple histogram. When you click on a bar, that program displays a message box showing the bar’s value. This example takes a different approach. When you move … Continue reading

Posted in drawing, graphics, mathematics | Tagged , , , , , , , , , , | Leave a comment

Draw a simple histogram in C#

When the program loads, the following code generates some random data. private const int MIN_VALUE = 0; private const int MAX_VALUE = 100; private float[] DataValues = new float[10]; // Make some random data. private void Form1_Load(object sender, EventArgs e) … Continue reading

Posted in drawing, graphics, mathematics | Tagged , , , , , , , , | 7 Comments