I have some data like this:
-1,2752 -1,4735 1
-0,5500 1,3287 2
-1,6293 -2,1460 1
-2,5267 -1,8739 1
1,2608 1,7519 2
-0,7812 -1,1967 1
-0,5014 -0,4453 1
-0,9952 -1,2938 1
0,7581 0,1762 1
1,3756 2,7475 2
-1,3448 -1,4061 1
-2,0411 0,0924 1
-0,5763 -0,5873 1
-0,4329 -2,4041 1
0,2016 -1,3607 1
I want to draw these point in a panel, but how you can see tere are some points with negative values. How can i move the origin point (0,0), to (200, 200). I want to make all points visible in panel.
You could calculate the center of the panel you're drawing into:
float centerX = this.ClientSize.Width / 2.0f;
float centerY = this.ClientSize.Height / 2.0f;
And then draw relative to the center:
graphics.DrawLine(centerX + x, centerY + Y, centerX + x, centerY + y);
All the points would "gather" around the center.