On 01/21/2012 09:38 PM, Roary wrote:
Thanks for your responses Jason and Jim. The ternary plot is definitely the
right style with the triangle fill. However, one of the important features
(that perhaps I understated) is that X3 will have more categories than X1
and X2, therefore the triangular shape is not appropriate. If X1 has I
categories and X2 has J categories, then X3 has I+J-1 categories. Therefore,
the overall plot would be in the shape of a parralelogram. Almost like an
extended ternary plot... The goal is to view these unbalanced categories on
the same scaling as each other... Would this be possible to construct?

Hi Roary,
Possible, yes. Easy, no, unfortunately. The attached PDF shows unequal categories drawn using the triax.abline function. It's easy enough to get the edges by simply drawing lines across the plot. Filling the resulting polygons would take quite a bit of calculation to work out the segments necessary to draw each one. The equilateral triangles in triax.fill are just drawn at equal spacings, edges across the x axis and heights down the y axis.

Alternatively, triax.plot and triax.fill could be rewritten to use a non-equilateral triangle as the plotting field, which would have internal triangles of the same proportions. Either way it means a fair amount of calculation, which I can't do at the moment. If you would like to work out the trigonometry, I could probably knock it over...

Jim

Attachment: triax_test.pdf
Description: Adobe PDF document

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to