用 Java 绘制图形
我正在开发的 Java Swing GUI 需要根据程序中生成的 x 和 y 坐标绘制 2D 图形。
有 Swing 组件吗?
或者有其他开源包用于此目的吗?
The Java Swing GUI that I'm developing needs to plot a 2D graph based on the x and y coordinates generated in the program.
Is there a Swing component for that?
Or is there any other open source package for the purpose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您应该查看 JFreeChart,它支持 Swing。 以下是一些示例:
http://www.jfree.org/jfreechart/samples.html
You should check out JFreeChart which has Swing support. Here are some samples:
http://www.jfree.org/jfreechart/samples.html
您应该查看 JFreeChart。
You should look at JFreeChart.
查看 Java 报告和图表库的功能比较; http://java-source.net/open-source/charting-and-reporting
check out the feature comparison for Java report and charting libraries; http://java-source.net/open-source/charting-and-reporting
这是我的相关答案:我对现有工具进行了总结,并展示了在 JPanel 中使用 Gnuplot 创建交互式图表的替代选项
Java 3D 绘图库?
对于您的情况(2d 图表)JFreeChart 可以。 但有时 JFreeChart 对于简单的图表来说有点过分了。
Here is a related answer of me: I have summary of existing tools and show a alternative option to create interactive charts with Gnuplot in a JPanel
Java 3D plot library?
For your case (2d charts) JFreeChart is OK. But sometimes JFreeChart is overkill for simple charts.