Search found 15 matches

by sammen
Mon Apr 27, 2009 2:26 pm
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

Re: Adding support for triangular diagrams - input welcome

Here's a simple example of a triangular diagram made with my code. It has no labels, but the tooltip shows the value and series key if I hover the mouse on the lines. In this hypothetical case we can imagine that in the field below the bottommost line, only a gas phase phase is stable. Above the upp...
by sammen
Mon Apr 27, 2009 8:43 am
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

Re: Adding support for triangular diagrams - input welcome

Without having looked at it yet, it sounds like XYPolygonAnnotation could be the way to go. I have the coordinates of the areas. The most apparent difficulty I guess would be to handle the cases when the fields cross an axis (meaning that the axis will close the polygon), but maybe that's already th...
by sammen
Sun Apr 26, 2009 9:46 am
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

Re: Adding support for triangular diagrams - input welcome

Oh. The chart in my previous post is not made in JFreeChart, it's just another example from the web. However I think the charts I have made with the Ternary class look better than the one in the previous post, simply because they have the same "look" as XYPlots (which I think look really nice). Next...
by sammen
Wed Apr 22, 2009 1:51 pm
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

Re: Adding support for triangular diagrams - input welcome

I have been spending some time on this now and have come up with something that looks pretty nice, I think. The TernaryPlot extends Plot, and I have introduced a number of other classes, such as renderers and axes that support the new plot type. All functionality of the XYPlot is not there, however ...
by sammen
Fri Mar 06, 2009 2:16 pm
Forum: JFreeChart
Topic: [HOWTO] create charts with defined data/plot area
Replies: 30
Views: 60075

Re: [HOWTO] create charts with defined data/plot area

I applied the patch this morning but it was acting the same. Now I just got time to sit down and see if I could find out where things go wrong, and it turned out to be trivial. In the demo app at sourceforge I think a line is missing: chart.setUseFixedChartAreaSize(true); So I never got in to this l...
by sammen
Fri Mar 06, 2009 10:13 am
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

Re: Adding support for triangular diagrams - input welcome

I will do as you wish. Even though I don't immediately see all the complications with my initial approach, I am quite sure I will thank you later.
by sammen
Thu Mar 05, 2009 7:11 pm
Forum: JFreeChart
Topic: [HOWTO] create charts with defined data/plot area
Replies: 30
Views: 60075

Re: [HOWTO] create charts with defined data/plot area

Ok. Of course you don't have to excuse anything. I think this is fun, I learn a lot, and I am extremely grateful for any help I can get. Later I hope I will be able to contribute something back to this project.
by sammen
Thu Mar 05, 2009 3:00 pm
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

Re: Adding support for triangular diagrams - input welcome

Thanks for the answer. I am starting to be convinced that I should at least override XYPlot. :) At a glance, to me the SpiderWebPlot looks like a very special plot. When it comes to the rendering, I don't think ternary plots differ very much from rectangular. For example, I want the rendering of the...
by sammen
Thu Mar 05, 2009 11:30 am
Forum: JFreeChart
Topic: [HOWTO] create charts with defined data/plot area
Replies: 30
Views: 60075

Re: [HOWTO] create charts with defined data/plot area

I hope that all PNG´s still look as expected,, i.e. have a square data area of the defined size. Yes, they all seem to look good. Since you might be seeing a subtle bug, I would really appreciate if you could report the preferred sizes of the ChartPanel to check whether they are ok, i.e. in line wi...
by sammen
Wed Mar 04, 2009 4:01 pm
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

Re: Adding support for triangular diagrams - input welcome

Most of my time on this has been spent trying to learn Java :), how JFreeChart is written and how I should incorporate the triangular support. I have done some very very basic stuff so far, before I ran into a little trouble. My approach is that the triangular diagrams are nothing but XYPlots. So I ...
by sammen
Wed Mar 04, 2009 9:41 am
Forum: JFreeChart
Topic: [HOWTO] create charts with defined data/plot area
Replies: 30
Views: 60075

Re: [HOWTO] create charts with defined data/plot area

Thanks again for a very detailed answer. I really appreciate you taking your time to explain things so well. I have very little time now to test and write, but I can comment on your last question: Even if the data area will not be completely visible within the viewport of the scrollpane when the cha...
by sammen
Tue Mar 03, 2009 5:53 pm
Forum: JFreeChart
Topic: [HOWTO] create charts with defined data/plot area
Replies: 30
Views: 60075

Re: [HOWTO] create charts with defined data/plot area

Thanks a lot for that post, Paradoxoff! It made a couple of things clearer to me. The patch I use and the example program I am working with are both taken from the patch over at sourceforge (FixedDataAndPlotArea2.diff and FixedDataAreaSizeDemo.java). Let's say I take FixedDataAreaSizeDemo.java from ...
by sammen
Mon Mar 02, 2009 4:38 pm
Forum: JFreeChart
Topic: [HOWTO] create charts with defined data/plot area
Replies: 30
Views: 60075

Re: [HOWTO] create charts with defined data/plot area

Hello paradoxoff, I'm trying to add ternary/triangular diagrams to JFreeChart, and while doing that I discovered the limitation concerning control of axis lengths. I want the triangular diagrams equilateral and in order to achieve that I need to control the axis lengths. So I found your patch and ho...
by sammen
Tue Feb 10, 2009 3:31 pm
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

David, thanks for your reply. Value labels will indeed be necessary, I didn't notice that the examples I gave don't have any. Ternary diagrams are a special type of XYPlots, but with transformed coordinates. I don't think it will be necessary to use a new type of dataset, the ones for XYPlots should...
by sammen
Mon Feb 02, 2009 2:44 pm
Forum: JFreeChart
Topic: Adding support for triangular diagrams - input welcome
Replies: 15
Views: 17784

Adding support for triangular diagrams - input welcome

I work in a scientific field where it is very common to visualize some calculation results in the form of Triangular/Ternary diagrams. (Here I had some URLs to information about such diagrams, but I was not allowed to post them. Look up "Ternary plot" on the English Wikipedia for examples of how the...