x*****r 发帖数: 2404 | 1 我的计算过程中会得到100条直线(Y=aX+b, a、b已知),
现在想把这组线都画出来,作为一个图形文件输出。
(X和Y的范围,我可以圈定。最好能够带上坐标轴。)
应该如何操作?多谢了。 |
w*r 发帖数: 2421 | 2 check out jfreechart.org
【在 x*****r 的大作中提到】 : 我的计算过程中会得到100条直线(Y=aX+b, a、b已知), : 现在想把这组线都画出来,作为一个图形文件输出。 : (X和Y的范围,我可以圈定。最好能够带上坐标轴。) : 应该如何操作?多谢了。
|
x*****r 发帖数: 2404 | 3 这个好象太高级了。
【在 w*r 的大作中提到】 : check out jfreechart.org
|
c*****t 发帖数: 1879 | 4 Learn to use BufferedImage and Graphics2D. To save the image to
a file, just use javax.imageio.ImageIO.write (bufferedImage, "png",
new File ("output.png")).
【在 x*****r 的大作中提到】 : 我的计算过程中会得到100条直线(Y=aX+b, a、b已知), : 现在想把这组线都画出来,作为一个图形文件输出。 : (X和Y的范围,我可以圈定。最好能够带上坐标轴。) : 应该如何操作?多谢了。
|
g*****g 发帖数: 34805 | 5 You guys should get straight to the point for newbies to understand
Graphics.drawLine(...) is all you need.
Extends JPanel and overwrite its paintComponent, and call the drawLine() in
it.
【在 c*****t 的大作中提到】 : Learn to use BufferedImage and Graphics2D. To save the image to : a file, just use javax.imageio.ImageIO.write (bufferedImage, "png", : new File ("output.png")).
|
w*r 发帖数: 2421 | 6 he need axis and lables, jfreechart is so far the easist solution ...
in
【在 g*****g 的大作中提到】 : You guys should get straight to the point for newbies to understand : Graphics.drawLine(...) is all you need. : Extends JPanel and overwrite its paintComponent, and call the drawLine() in : it.
|
c*z 发帖数: 62 | 7 seems like a class project.
just print out the numbers, do it into excel. |
x*****r 发帖数: 2404 | 8 基本搞定,多谢各位。
【在 c*****t 的大作中提到】 : Learn to use BufferedImage and Graphics2D. To save the image to : a file, just use javax.imageio.ImageIO.write (bufferedImage, "png", : new File ("output.png")).
|