Biplot Chart in JFreeChart

A free public discussion forum for the JFreeChart class library.

Biplot Chart in JFreeChart

Postby elendil » Fri Mar 02, 2012 3:22 am

Hi! Is there a way to generate a biplot in JFreeChart? I browsed the API and this forum for native support in JFreeChart for biplot but I wasn't able to find one.
elendil
 
Posts: 4
Joined: Fri Mar 02, 2012 3:19 am

Re: Biplot Chart in JFreeChart

Postby matinh » Fri Mar 02, 2012 8:04 am

Hi!

Currently (up to v1.0.14) there is no support for Biplots in JFreeChart. There is support for related ScatterPlots.
Feel free to implement Biplot support and contribute it back to JFreeChart :)

regards,
- martin
matinh
 
Posts: 467
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Re: Biplot Chart in JFreeChart

Postby matinh » Fri Mar 02, 2012 8:10 am

Having another thought brings up the following idea:
Scatter plots in JFreeChart use the XYDotRenderer on an XYPlot. You could probably create a biplot-chart by just adding another XYDataset and rendering it with a simple XYLineAndShapeRenderer.

hth,
- martin

PS: please let us know if it did work out.
matinh
 
Posts: 467
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Re: Biplot Chart in JFreeChart

Postby elendil » Fri Mar 02, 2012 9:35 am

Hmm. Thanks. I'll try that method.
elendil
 
Posts: 4
Joined: Fri Mar 02, 2012 3:19 am

Re: Biplot Chart in JFreeChart

Postby elendil » Tue Mar 06, 2012 2:21 am

I'm stumped. The XYDataset class in JFreeChart only allows double values? Here is a snippet of the data I am concerned with:

Code: Select all
Env            Gen    Y
BH BOHOL PI   AZU   1.344
CR CARIMAGU   AZU   1.097
CV CAVINTI    AZU   0.48375


I'm supposed to make a biplot from that. If I go about doing that using a scatter plot, I would have to separate Env and Gen into different plots initially.
elendil
 
Posts: 4
Joined: Fri Mar 02, 2012 3:19 am

Re: Biplot Chart in JFreeChart

Postby matinh » Tue Mar 06, 2012 8:14 am

I'm stumped. The XYDataset class in JFreeChart only allows double values?

That's right. If you want non-number values you would have to use a CategoryPlot with a CategoryAxis. You would probably use the ScatterRenderer for this, like shown in in the JFreeChart demo-collection (Miscellaneous/ScatterRendererDemo1).

hth,
- martin
matinh
 
Posts: 467
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Re: Biplot Chart in JFreeChart

Postby elendil » Thu Mar 08, 2012 2:05 am

Here is a sample chart generated using R. Can anyone guide on how to do this using JFreeChart?

Image
elendil
 
Posts: 4
Joined: Fri Mar 02, 2012 3:19 am


Return to JFreeChart - General

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 7 guests