You forgot to set the range for the canvas (or may be confused
the canvas size in pixel units (100,100) with the canvas range
in user coordinates. By default the canvas range is set to [0,1].
In your example above, you should not call pm2d->Draw() for each point,
but only once.
I have modified your macro in the following way:
{
gROOT->Reset();
r = new TCanvas("name", "title", 600, 400) ;
r.SetFillColor(14);
r.Range(-20,-20,120,120);
TPolyMarker * pm2d = new TPolyMarker(100*100);
pm2d->SetMarkerColor(2);
int count = 0;
for (int i = 0; i < 100; ++i) {
for (int j = 0; j < 100; ++j) {
pm2d->SetPoint(count++,j,i);
}
}
pm2d->Draw();
r.Update();
}
Rene Brun