Is possible make an axis scale break? I want Break Y Axis.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
josafassj
Posts: 10
Joined: Sat Jul 26, 2008 1:24 pm

Is possible make an axis scale break? I want Break Y Axis.

Post by josafassj » Tue Aug 18, 2009 3:43 pm

Hi everybody,

I have to display data that varies greatly in magnitude. So I want to break the axis scale.
Is it possible?

Regards,

Josafá
Last edited by josafassj on Wed Aug 26, 2009 5:24 pm, edited 3 times in total.

yumex85
Posts: 4
Joined: Tue Aug 25, 2009 5:12 pm
antibot: No, of course not.

Re: Is possible make an axis scale break?

Post by yumex85 » Tue Aug 25, 2009 10:21 pm


josafassj
Posts: 10
Joined: Sat Jul 26, 2008 1:24 pm

Re: Is possible make an axis scale break?

Post by josafassj » Wed Aug 26, 2009 5:20 pm


No.
My question is: How do I break an axis so that one or two very large values don't drown out the rest of my chart?

I want something like this http://peltiertech.com/Excel/Charts/BrokenYAxis.html.

I had tried with a logarithmic scale, but the resulting chart was not good. The higher values was drawn together, very confusing.

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Is possible make an axis scale break? I want Break Y Axis.

Post by paradoxoff » Wed Aug 26, 2009 9:32 pm

The DateAxis supports something called a TimeLine which should provide the functionality that you need. But you need a NumberAxis which does not support that. I wonder whether it would be possible to steal the TimeLIne could from the DateAxis, rewrite it to be useable for the NumberAxis, and then provide a suitable implementation.
For now, as a workaround, you could use a CombinedDomainCategoryPlot with two subplots. Use a small range (starting from zero) for the lower plot and use a small range around the "very large values".

deern
Posts: 1
Joined: Wed Nov 04, 2009 12:22 am
antibot: No, of course not.

Re: Is possible make an axis scale break? I want Break Y Axis.

Post by deern » Wed Nov 04, 2009 12:38 am

Can any one provide any direction on how to implement this functionality? I require the same functionality, to insert breaks into an axis.

josafassj
Posts: 10
Joined: Sat Jul 26, 2008 1:24 pm

Re: Is possible make an axis scale break? I want Break Y Axis.

Post by josafassj » Thu Dec 03, 2009 1:44 pm

Hi,

I had done what paradoxoff said, and used the CombinedDomainCategoryPlot.
Here is the result: Image

Regards,

Locked