This is an example describes how I solved the problem using C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public double[][] Iris =
{
new double[] {2,14}, /*1*/
new double[] {24,56}, /*2*/
new double[] {23,51}, /*3*/
new double[] {2 ,10}, /*4*/
new double[] {20,52}, /*5*/
new double[] {19,51}, /*6*/
new double[] {13,45}, /*7*/
new double[] {16,47}, /*8*/
new double[] {17,45}, /*9*/
new double[] {14,47}, /*10*/
new double[] {2,16}, /*11*/
new double[] {19,50} /*12*/
};
int[] idx = new int[] { 1, 0, 2, 1, 0, 1, 0, 2, 0, 1, 1, 2 };
private void panel1_Click(object sender, EventArgs e)
{
Graphics g = panel1.CreateGraphics();
Bitmap bm = new Bitmap(500,500);
for (int i = 0; i < Iris.Length; i++)
{
if (idx[i] == 0)
{
bm.SetPixel(Convert.ToInt32(Iris[i][0]), Convert.ToInt32(Iris[i][1]), Color.Red);
//bm.SetPixel((int)Iris[i][0], (int)Iris[i][1], Color.Red);
g.DrawImageUnscaled(bm, 500, 500);
}
else
if (idx[i] == 1)
{
bm.SetPixel(Convert.ToInt32(Iris[i][0]), Convert.ToInt32(Iris[i][1]), Color.Green);
g.DrawImageUnscaled(bm, 5, 5);
}
else
{
bm.SetPixel(Convert.ToInt32(Iris[i][0]), Convert.ToInt32(Iris[i][1]), Color.Blue);
g.DrawImageUnscaled(bm, 5, 5);
}
}
}
}
}