由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 用java画直线的问题
相关主题
请教BufferedImage中的setColor问题。questions on repaint()
怎么能够减少image上的锯齿?Re: JPanel help!
请问Java如何实现对.jpg图片的缩放显示?how to paint on a Jpanel?
怎么编辑和保存JAVA的图片输出?怎么控制paint?
Java 里划直线加粗的问题how to improve java programming ability
为啥画不出来?用java 2D作图, 画线条的时候都成锯齿状怎么办
Re: question about interface.(也许是答案)suggestion needed for graph
override/overload/overwrite in Java画多边形怎么实现?
相关话题的讨论汇总
话题: 直线话题: file话题: drawline话题: extends
进入Java版参与讨论
1 (共1页)
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")).

1 (共1页)
进入Java版参与讨论
相关主题
画多边形怎么实现?Java 里划直线加粗的问题
如何在TextArea里面画位图为啥画不出来?
JTextArea行间距如何设定?Re: question about interface.(也许是答案)
java graphics2d 画图请教override/overload/overwrite in Java
请教BufferedImage中的setColor问题。questions on repaint()
怎么能够减少image上的锯齿?Re: JPanel help!
请问Java如何实现对.jpg图片的缩放显示?how to paint on a Jpanel?
怎么编辑和保存JAVA的图片输出?怎么控制paint?
相关话题的讨论汇总
话题: 直线话题: file话题: drawline话题: extends