How can I graph values that are incredibly small in Java? - java

Basically I am attempting to use JFreeChart right now to graph some values. The only problem is that the values are incredibly minuscule, e.g 7.069781E-13. I believe these values are too small for JFreeChart to display. How can I display these small values visually in Java in a line chart format?
It looks like this currently:
And I want to make it look similar to this:

I found a work around.
I simply multiplied all the values by a factor of 100 so the graph now looks similar to the one in the example. I will include a disclaimer in the legend saying the chart has been multiplied by a factor to clearly see the line chart.

Also consider these alternative:
Invoke setRange(), seen here, to expand the y axis in the area of interest.
Add suitable controls, seen here, to control y zoom.
Advise users how to use the mouse for zoom control, as shown here.

Related

How can I give two different styles for the same series of a line chart?

I would like to use JavaFX to assemble a line chart such that when there is no data to plot in a series, the space is empty. Something like that:
Chart
Notice that I would like to keep myself in the same series, just by changing your style in one part. But any help is welcome. Thank you.

Drawing a range column chart using DOT language or java or similar?

I want to draw a range column chart for my data, something similar to this.
Any suggestion?
GraphViz isn't suitable for this sort of chart - it draws graphs of the "nodes and edges" type, rather than this sort of style.
It looks like the "range column" chart is essentially a stacked bar chart with four elements in each stack, with the bottom element and third element drawn without borders and with a transparent fill. So, I'd suggest trying to use a conventional graphing library that gives enough flexibility of control over bar charts to produce what you want.

JFreeChart Crosshair on a combined plot

I'm using a combined plot composed of 2 graph which share the same X axis (by sharing, I mean, the timeframe is the same for the two graph). The upper graph is a regular timeseries while the lower chart is a barchart. I would like to display a crosshair on the combined chart as a whole... Right now I can display crosshair only on each graph separately even thought I have specify on the combined plot that I wanted to display the crosshair. To be more explicit, I can't synchronise both crosshair... Any idea on how to achieve that ?
thanks
It would appear to work if you use a shared domain axis, as discussed here and as shown in CrosshairDemo2? In addition, an sscce might help clarify your usage.

Graphing Data with Java Processing

I'm looking at creating a program with Processing (processing.org) in Java. The program will involve graphing a large amount of 2D data. I would like for the points to be displayed to fill the window. I've looked at their libraries and I don't see anything for data visualization. Am I missing something?
I've always used JFreechart or, for more complex graphing exporting to a text flie and then gnuplot.
another vote for JFreeChart. Although for more complex graphing I've written my own (AWT).
JUNG Is a favorite of mine.
Processing is really powerful and can be considered a "raw" language given how close you can get to actual graphic programming. I've myself created many graphs and can tell you that you have to be very careful when using this library. It's great but you have to do everything from scratch. This means creating lines for the x and y axis, creating your labels, creating the space, etc.
My suggestion is to set the number of points you'll most likely have, say 1000, and always display with that much data. If you have too little or too much, just adjust it before sending it to graph. This way you'll always have a set number. From here what you do is the following:
pushMatrix();
scale(widthOfGraph/1000, heightOfGraph/numberOfPointsUp);
beginShape(LINES);
for (int i = 0; i < 1000; i++) {
vertex(x0,y0);
vertex(x1,y1);
endShape();
popMatrix();
This will create all your lines in a single drawing operation meaning you'll save a lot of opening and closing shapes. You are also using a stack matrix to use the scale operation to adjust the displaying size of your canvas. Everything else is up to you. Hope that helps.

What is the meaning of jitter in visualize tab of weka

In weka I load an arff file. I can view the relationship between attributes using the visualize tab.
However I can't understand the meaning of the jitter slider. What is its purpose?
You can find the answer in the mailing list archives:
The jitter function in the Visualize panel just adds artificial random
noise to the coordinates of the plotted points in order to spread the
data out a bit (so that you can see points that might have been
obscured by others).
I don't know weka, but generally jitter is a term for the variation of a periodic signal to some reference interval. I'm guessing the slider allows you to set some range or threshold below which data points are treated as being regular, or to modify the output to introduce some variation. The wikipedia entry can give you some background.
Update: from this pdf, the jitter slider is for this purpose:
“Jitter” option to deal with nominal attributes (and to detect “hidden”data points)
Based on the accompanying slide it looks like it introduces some variation in the visualisation, perhaps to show when two data points overlap.
Update 2: This google books extract (to Data mining By Ian H. Witten, Eibe Frank) seems to confirm my guess:
[jitter] is a random displacement applied to X and Y values to separate points that lie on top of one another. Without jitter, 1000 instances at the same data point would look just the same as 1 instance
I don't know the products you mention, but jittering generally means randomising the sample positions. Eg, in ray tracing you would normally render a ray though each pixel on the screen. Jittering adds a random offset to each ray to reduce issues caused by regular aliasing.

Categories

Resources