Search found 14 matches

by stledger
Tue Dec 08, 2015 6:07 pm
Forum: JFreeChart
Topic: New Axis Type ProbabilityAxis
Replies: 8
Views: 13122

Re: New Axis Type ProbabilityAxis

daress,

I agree that NormalProbabilityAxis would be a better name. I have not made an axis for any other distributions. I mostly use log-normal distributions in my work. Please feel free to add another axis type.

Nice to see it was useful for someone.

Thanx,

John
by stledger
Sat Apr 26, 2014 4:28 pm
Forum: JFreeChart
Topic: New Axis Type ProbabilityAxis
Replies: 8
Views: 13122

Re: New Axis Type ProbabilityAxis

I had a bug in the previous submittal. If you zoomed out and then back in around the 0.1 or 99.9 tick marks on the axis, the tick marks were not always in the correct position, and you could get 0 or 100 for the tick mark, etc. I have this fixed now. I also fixed the setPrecision() method so that it...
by stledger
Sun Apr 20, 2014 3:11 am
Forum: JFreeChart
Topic: New Axis Type ProbabilityAxis
Replies: 8
Views: 13122

Re: New Axis Type ProbabilityAxis

I have fixed the axis so that at least one labeled tick mark will show on zoom in. I've limited the minimum axis range length to 0.1, and the smallest tick mark step size to 0.01. This is due to the accuracy of the approximations for calculating the cumulative normal function and inverse cumulative ...
by stledger
Wed Mar 19, 2014 3:17 pm
Forum: JFreeChart
Topic: New Axis Type ProbabilityAxis
Replies: 8
Views: 13122

Re: New Axis Type ProbabilityAxis

David,

I hadn't even considered that. I think I see a way to fix it so that tick marks show on zoom in, but I won't be able to work on it for a few weeks. I'll submit a new version around April 15.

John
by stledger
Sun Mar 16, 2014 10:00 pm
Forum: JFreeChart
Topic: Log Probability Demo
Replies: 1
Views: 3090

Re: Log Probability Demo

Made some minor changes, basically taking our some magic numbers, and making it easier to change the number of random draws. This code is free, open, and submitted for use by the JFreeChart project. John /* ------------------- * ProbabilityAxisDemoLog.java * ------------------- * (C) Copyright 2004-...
by stledger
Sun Mar 16, 2014 9:58 pm
Forum: JFreeChart
Topic: Linear Probability Demo
Replies: 1
Views: 2862

Re: Linear Probability Demo

Made a few minor changes to the demo. It is now easy to change the number of draws. Also, now calculate the cumulative percent, rather than using a value from a table. Basically, took out some magic numbers. This code is free, and submitted for the JFreeChart project use. John /* -------------------...
by stledger
Sun Mar 16, 2014 9:55 pm
Forum: JFreeChart
Topic: New Axis Type ProbabilityAxis
Replies: 8
Views: 13122

Re: New Axis Type ProbabilityAxis

I made some minor changes to the probability axis. Extended the range, and took out some magic numbers. This is free code donated to the JFreeChart library. package org.jfree.chart.axis; /* =========================================================== * JFreeChart : a free chart library for the Java(t...
by stledger
Thu Jan 09, 2014 4:50 am
Forum: JFreeChart
Topic: Log Probability Demo
Replies: 1
Views: 3090

Log Probability Demo

This demos how to use the probability axis to plot log-normally distributed data /* ------------------- * LineChartDemo6.java * ------------------- * (C) Copyright 2004-2008, by Object Refinery Limited. * */ package demo; import java.util.Arrays; import java.util.Random; import javax.swing.JPanel; i...
by stledger
Thu Jan 09, 2014 4:49 am
Forum: JFreeChart
Topic: Linear Probability Demo
Replies: 1
Views: 2862

Linear Probability Demo

Once again, posting code here. This demonstrates using the ProbabilityAxis to plot normally distributed data. /* ------------------- * ProbabilityAxisDemoLinear.java * ------------------- * (C) Copyright 2004-2008, by Object Refinery Limited. * */ package demo; import java.util.Arrays; import java.u...
by stledger
Thu Jan 09, 2014 4:47 am
Forum: JFreeChart
Topic: New Axis Type ProbabilityAxis
Replies: 8
Views: 13122

New Axis Type ProbabilityAxis

This class generates a probability axis. See the comments for its use. package org.jfree.chart.axis; import java.awt.Font; import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import java.io.Serializable; import java.util.ArrayList; import java.util.Hashtable; import java.util.Iterator; imp...
by stledger
Thu Jan 09, 2014 4:41 am
Forum: JFreeChart
Topic: XYBlockChartDemoColor Code
Replies: 0
Views: 4374

XYBlockChartDemoColor Code

I don't understand how to make contributions, so I'll just try adding the code here. This does the XYBlockChartDemo in color rather than shades of gray. package demo; /* ---------------------- * XYBlockChartDemoColor.java * ---------------------- * (C) Copyright 2006, 2007, by Object Refinery Limite...
by stledger
Thu Mar 13, 2008 4:55 am
Forum: JFreeChart
Topic: Two or more XYDatasets in ScatterPlot
Replies: 1
Views: 2619

Re: Two or more XYDatasets in ScatterPlot

I want to have two or more sets of data in my ScatterPlot. How should I do, is it possible? The following code I use at the moment, because the ScatterPlot require the type XYDataset, but it is only one set of data. I can not find data.add() or something like this.... please help me /Mike XYDataset...
by stledger
Thu Mar 13, 2008 4:40 am
Forum: JFreeChart
Topic: Get value of a point on xy chart
Replies: 20
Views: 29552

Hello John, Thx for the code...this would be helpful... could you please tell me that which 'change' code you are talking abt? and this code would be added in the last so that it would print current points ? i am new to it so can you tell me in brief how to start with it? Anamika Sorry I wasn't cle...
by stledger
Sun Mar 09, 2008 7:46 am
Forum: JFreeChart
Topic: Get value of a point on xy chart
Replies: 20
Views: 29552

Possible reason why last click is showing

I had a similar problem getting the coordinates to show on a plot for a mouse click. I solved the problem by including the "change" code in an invokeLater() block. Maybe the following code fragment will help: javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { plot.clearAnnot...