Java plotting library like python's matplotlib [closed]
Asked Answered
H

1

19

I am looking for a java plotting library that might be as good as matplotlib is for python. I have done some research looking over SO questions, but many of them are outdated and a lot has changed in the few years since they were asked. The suggestions that come up lead to websites that at the surface seem to be offering good libraries but my needs are immediate and I cannot afford the time to use them all and find the best through experience.

And so I am asking for your experience, can any of you recommend a graphing library that is to java as matplotlib is to python (in 2013)?

Helot answered 24/9, 2013 at 21:15 Comment(3)
JFreeChart or maybe even JGraph depending on your needs...Regardless you're going to need some time to learn the APIsConscript
I answered a similar question here: https://mcmap.net/q/668409/-how-to-plot-real-time-data-in-android-closedHoleproof
It's not mathplotlib-like, but Tablesaw's Plot.ly wrapper is a good Java plotting library. Plots are rendered in HTML/JavaScript so they can be viewed in a browser. I use it mostly in my IDE. (There's a way to write an HTML page and open your default Browser on it.) It supports a large subset of the Plot.ly chart types and configuration options. github.com/jtablesaw/tablesaw. Tablesaw itself is a Java dataframe.Goddord
C
7

There's a ton of graphing libraries available for Java. Plotting libraries? Not so much. A list is availble at https://stackoverflow.com/questions/4851035/i-am-looking-for-a-plotting-library-for-java

If none of those cut it, Here's one some quick Googling found me. While I've never used it, based off it's description JMathPlot seems really good.

Clitoris answered 24/9, 2013 at 23:0 Comment(5)
Hi, for quick visualization I used this: github.com/sh0nk/matplotlib4jEleonoraeleonore
@AliAit-Bachir I was going to recommend the same library, but had many problems when trying to do simple things .... like drawing geometrical figures, or plotting points (scatter) with different colors/size - it's not supported!. However, I think the lib will be improved soon, because I checked it on github and it's active. The other recommended libraries are nothing like matplotlib, so I think it is preferable to store the data into csvs and instead of using java, use python to plot (I mean, if you can do it)Landmeier
The question itself is wrong because there is a plotting library called matplotlib. Yes, one has to use Python as its command language. But there is nothing that prevents a Java program from running a Python script, either stored in a String or in a separate .py file. Just spawn a Python interpreter and run it as a subprocess. Then one can simply display the resulting graphics on the screen, be it from a jpeg, gif, tiff, png, ps, eps, pdf, or whatever format one prefers.Corpora
link to linked question broken; may use web.archive.org/web/20150402020904/http://stackoverflow.com:80/…Hairbreadth
I wonder what the practical implications of "no OpenGL" are though.Haldan

© 2022 - 2024 — McMap. All rights reserved.