Bitmap bTextBmp = new Bitmap(20, 50);
Graphics gphText = Graphics.FromImage(bTextBmp);
gphText.TranslateTransform(10, 25);//平移到适当的位置,以便下面旋转后可以显示
gphText.RotateTransform(90);//旋转角度,以达到你要的效果
// gphText.DrawString("counts", new Font("Times New Roman", 12, FontStyle.Regular), Brushes.Black, new PointF(10, 0));
StringFormat format = new StringFormat(StringFormatFlags.NoClip);
format.Alignment =StringAlignment.Center;
format.LineAlignment = StringAlignment.Center;
gphText.DrawString("Counts ", new Font("Times New Roman", 12, FontStyle.Regular), Brushes.Black, 0, 0, format);
pictureBox2.Image = bTextBmp;
主要是想做y坐标轴的标注,这样是可以旋转,但是字体变形,有没有更好的方法,或者,如何写才正确。谢谢。就是想画一个简单的折线图。。