You don't give an example, but in general you can use a vector for cex with
the values proportional to the third variable.

Same goes for color: col can be a vector, not just a single value.

This has been discussed before on-list, and fairly recently.

Sarah

On Wed, Jan 12, 2011 at 2:19 PM, John Sorkin
<jsor...@grecc.umaryland.edu> wrote:
> I would like to plot 3-dimensional data on a two-dimensional scatter-plot.
> Is there a way I can automatically modify the plot symbol (e.g. changing size 
> or color) to indicate the value of a third variable? E.g. How can I plot 
> weight vs. age and indicate the value of muscle mass for each value 
> weight-age pair by making the plot point proportional to the subject's muscle 
> mass?
> Thanks,
> John
>
-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
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