实时Java图形/图表库?

时间:2022-12-23 03:53:44

There was an earlier thread on Java graph or chart library, where JFreeChart was found to be quite good, but, as stated in its FAQ, it's not meant for real-time rendering.

在Java图形或图表库上有一个早期的线程,其中发现JFreeChart非常好,但是,如其FAQ中所述,它不适用于实时渲染。

Can anyone recommend a comparable library that supports real-time rendering? Just some basic xy-rendering - for instance, getting a voltage signal from data acquisition system and plotting it as it comes (time on x-axis, voltage on y-axis).

任何人都可以推荐一个支持实时渲染的类似库吗?只是一些基本的xy渲染 - 例如,从数据采集系统获取电压信号并在其到来时绘制它(x轴上的时间,y轴上的电压)。

12 个解决方案

#1


9  

What the FAQ actually says is that JFreeChart doesn't support hard real-time charting, meaning that the chart isn't updated when new data arrives or at deterministic interval after it. However I have found that JFreeChart can be used for the kind of applications you are describing. You can achieve 1 update per second, which is fine. I don't think a human eye can follow something quicker than this.

FAQ实际上说的是JFreeChart不支持硬实时图表,这意味着图表在新数据到达时或在其后的确定性时间间隔内不会更新。但是我发现JFreeChart可以用于您描述的那种应用程序。你可以达到每秒1次更新,这很好。我不认为人眼可以比这更快地追随某些事情。

If you want something more than this, I doubt you will find anything in Java (or even in another language). Operating Systems that we use aren't designed to be real time. You can't have a guaranty that they will respond in a minimum interval after an event. A tight integration with the hardware driver will be needed to show more than 1-10 frames per second.

如果你想要更多的东西,我怀疑你会发现任何Java(甚至是其他语言)。我们使用的操作系统并非设计为实时。您无法保证他们会在事件发生后的最短时间内做出回应。需要与硬件驱动程序紧密集成才能显示每秒超过1-10帧。

However, if you design your application correctly, the OS will do respond quickly and your application can easily display a "real-time" graph (meaning a graph that updates once a second). Just don't use your application to shut down a valve in an emergency situation!

但是,如果您正确设计应用程序,操作系统将快速响应,您的应用程序可以轻松显示“实时”图形(意味着每秒更新一次的图形)。只是不要在紧急情况下使用您的应用程序关闭阀门!

#3


6  

Just stumbled upon a description on how to use the visualvm charting library. Looks very nice!

只是偶然发现了如何使用visualvm图表库的描述。看起来很不错!

#4


5  

have a look at processing -- it's an open-source, java-based environment designed for all sorts of animated visualizations.

看看处理 - 它是一个基于java的开源环境,专为各种动画可视化而设计。

#5


5  

Well, if it has to be Java, then you might want to look into these.

好吧,如果它必须是Java,那么你可能想要研究这些。

#6


5  

You probably have already found a good solution, but if not, I have recently done some work on a framework for producing 2D charts allowing for live updates at a rate of over 50 changes per second.

您可能已经找到了一个很好的解决方案,但如果没有,我最近在生成2D图表的框架上做了一些工作,允许以每秒超过50次更改的速率进行实时更新。

The original intention was to mimic the appearance of a chart recorder in a scrolling region of a web page, but I believe the approach has wider application.

最初的目的是模仿网页滚动区域中图表记录器的外观,但我相信这种方法具有更广泛的应用。

A demo can be found at Chart Recorder Demo if anyone is interested.

如果有人感兴趣,可以在Chart Recorder演示中找到演示。

The appearance is defined by a template (www.journeylog.co.uk/chart/templates/chartRecorder.xml). One feature is the ability to specify drawing either on the server or in the browser using ExplorerCanvas.

外观由模板(www.journeylog.co.uk/chart/templates/chartRecorder.xml)定义。一个功能是能够使用ExplorerCanvas在服务器或浏览器中指定绘图。

If anyone is interested I could start an open source project for it.

如果有人有兴趣,我可以为它开始一个开源项目。

#7


4  

Fast enough for real time is swtchart, at least in my experience. Even with lots of data. Don't be scared away by the version number, yes it is a rather new API, but I use it successfully without problems.

至少根据我的经验,足够快的实时是swtchart。即使有大量数据。不要被版本号吓跑,是的,它是一个相当新的API,但我成功地使用它没有问题。

As the name implies, it is based on SWT, which uses native OS drawing. Also it does some clever optimizations for drawing fast, like not drawing all points in the dataset (see Large Series Example Snippet).

顾名思义,它基于SWT,它使用本机OS绘图。此外,它还可以快速绘制一些聪明的优化,例如不绘制数据集中的所有点(请参阅大型系列示例代码段)。

#8


2  

this seems like a good candidate.

这似乎是一个很好的候选人。

http://jchart2d.sourceforge.net/

demo:

http://jchart2d.sourceforge.net/applet.shtml

#9


2  

JCCkit is vary good library who are targetting less memory especially in embedded environment : https://sourceforge.net/projects/jcckit .

JCCkit是一个不同的好库,他们的目标是更少的内存,特别是在嵌入式环境中:https://sourceforge.net/projects/jcckit。

Takes less than <100 kb .

小于100 kb。

#10


1  

You could dig around the source for NetBeans. The profiler does real time graphing of various things such as memory usage.

您可以挖掘NetBeans的源代码。分析器可以实时绘制各种内容,例如内存使用情况。

#11


1  

SWT XYGraph can plot data with your own data provider, so you can create a real time data provider providing live data. With SWTChart and JFreeChart, you have to prepare the whole array for it.

SWT XYGraph可以使用您自己的数据提供者绘制数据,因此您可以创建提供实时数据的实时数据提供者。使用SWTChart和JFreeChart,您必须为它准备整个数组。

#12


0  

This question has been answered well in: Java Real time graph plotting

这个问题已得到很好的解答:Java实时图形绘图

As VisualVM includes a Charting API, and this API is included in the JDK, you have a good/fast charting API available.

由于VisualVM包含Charting API,并且此API包含在JDK中,因此您可以使用良好/快速的图表API。

#1


9  

What the FAQ actually says is that JFreeChart doesn't support hard real-time charting, meaning that the chart isn't updated when new data arrives or at deterministic interval after it. However I have found that JFreeChart can be used for the kind of applications you are describing. You can achieve 1 update per second, which is fine. I don't think a human eye can follow something quicker than this.

FAQ实际上说的是JFreeChart不支持硬实时图表,这意味着图表在新数据到达时或在其后的确定性时间间隔内不会更新。但是我发现JFreeChart可以用于您描述的那种应用程序。你可以达到每秒1次更新,这很好。我不认为人眼可以比这更快地追随某些事情。

If you want something more than this, I doubt you will find anything in Java (or even in another language). Operating Systems that we use aren't designed to be real time. You can't have a guaranty that they will respond in a minimum interval after an event. A tight integration with the hardware driver will be needed to show more than 1-10 frames per second.

如果你想要更多的东西,我怀疑你会发现任何Java(甚至是其他语言)。我们使用的操作系统并非设计为实时。您无法保证他们会在事件发生后的最短时间内做出回应。需要与硬件驱动程序紧密集成才能显示每秒超过1-10帧。

However, if you design your application correctly, the OS will do respond quickly and your application can easily display a "real-time" graph (meaning a graph that updates once a second). Just don't use your application to shut down a valve in an emergency situation!

但是,如果您正确设计应用程序,操作系统将快速响应,您的应用程序可以轻松显示“实时”图形(意味着每秒更新一次的图形)。只是不要在紧急情况下使用您的应用程序关闭阀门!

#2


#3


6  

Just stumbled upon a description on how to use the visualvm charting library. Looks very nice!

只是偶然发现了如何使用visualvm图表库的描述。看起来很不错!

#4


5  

have a look at processing -- it's an open-source, java-based environment designed for all sorts of animated visualizations.

看看处理 - 它是一个基于java的开源环境,专为各种动画可视化而设计。

#5


5  

Well, if it has to be Java, then you might want to look into these.

好吧,如果它必须是Java,那么你可能想要研究这些。

#6


5  

You probably have already found a good solution, but if not, I have recently done some work on a framework for producing 2D charts allowing for live updates at a rate of over 50 changes per second.

您可能已经找到了一个很好的解决方案,但如果没有,我最近在生成2D图表的框架上做了一些工作,允许以每秒超过50次更改的速率进行实时更新。

The original intention was to mimic the appearance of a chart recorder in a scrolling region of a web page, but I believe the approach has wider application.

最初的目的是模仿网页滚动区域中图表记录器的外观,但我相信这种方法具有更广泛的应用。

A demo can be found at Chart Recorder Demo if anyone is interested.

如果有人感兴趣,可以在Chart Recorder演示中找到演示。

The appearance is defined by a template (www.journeylog.co.uk/chart/templates/chartRecorder.xml). One feature is the ability to specify drawing either on the server or in the browser using ExplorerCanvas.

外观由模板(www.journeylog.co.uk/chart/templates/chartRecorder.xml)定义。一个功能是能够使用ExplorerCanvas在服务器或浏览器中指定绘图。

If anyone is interested I could start an open source project for it.

如果有人有兴趣,我可以为它开始一个开源项目。

#7


4  

Fast enough for real time is swtchart, at least in my experience. Even with lots of data. Don't be scared away by the version number, yes it is a rather new API, but I use it successfully without problems.

至少根据我的经验,足够快的实时是swtchart。即使有大量数据。不要被版本号吓跑,是的,它是一个相当新的API,但我成功地使用它没有问题。

As the name implies, it is based on SWT, which uses native OS drawing. Also it does some clever optimizations for drawing fast, like not drawing all points in the dataset (see Large Series Example Snippet).

顾名思义,它基于SWT,它使用本机OS绘图。此外,它还可以快速绘制一些聪明的优化,例如不绘制数据集中的所有点(请参阅大型系列示例代码段)。

#8


2  

this seems like a good candidate.

这似乎是一个很好的候选人。

http://jchart2d.sourceforge.net/

demo:

http://jchart2d.sourceforge.net/applet.shtml

#9


2  

JCCkit is vary good library who are targetting less memory especially in embedded environment : https://sourceforge.net/projects/jcckit .

JCCkit是一个不同的好库,他们的目标是更少的内存,特别是在嵌入式环境中:https://sourceforge.net/projects/jcckit。

Takes less than <100 kb .

小于100 kb。

#10


1  

You could dig around the source for NetBeans. The profiler does real time graphing of various things such as memory usage.

您可以挖掘NetBeans的源代码。分析器可以实时绘制各种内容,例如内存使用情况。

#11


1  

SWT XYGraph can plot data with your own data provider, so you can create a real time data provider providing live data. With SWTChart and JFreeChart, you have to prepare the whole array for it.

SWT XYGraph可以使用您自己的数据提供者绘制数据,因此您可以创建提供实时数据的实时数据提供者。使用SWTChart和JFreeChart,您必须为它准备整个数组。

#12


0  

This question has been answered well in: Java Real time graph plotting

这个问题已得到很好的解答:Java实时图形绘图

As VisualVM includes a Charting API, and this API is included in the JDK, you have a good/fast charting API available.

由于VisualVM包含Charting API,并且此API包含在JDK中,因此您可以使用良好/快速的图表API。