I believe you want to add the argument

groups=Stream

to your stripplot statement.

As a related aside, for any on this listserv who haven't seen it, be  
sure to check out Mike Driscoll's Survey of R Graphics slides from a  
recent LA Area R User's Group meeting
  http://www.slideshare.net/guest43ed8709/la-r-users-group-survey-of-r-graphics

And for those interested in ggplot2, check the new-ish wiki for the  
package - http://ggplot2.wik.is/ - it contains some case studies that  
are highly relevant to ecologists of several different stripes.  If  
you've got something interesting, consider adding it!

-Jarrett


----------------------------------------
Jarrett Byrnes
Postdoctoral Associate, Santa Barbara Coastal LTER
Marine Science Institute
University of California Santa Barbara
Santa Barbara, CA 93106-6150

http://www.lifesci.ucsb.edu/eemb/labs/cardinale/people/byrnes/index.html

On Oct 6, 2009, at 3:13 PM, Elizabeth Green wrote:

> Hello listservers.
>
> I have a question.  Is there a way to use different symbols for data
> points of different categories (i.e. to represent a 3rd variable,
> which is a factor) when using trellis graphics?  I am plotting a
> continuous variable v. a factor using the stripplot function (lattice
> package), because I want each data point represented on the plot.  but
> i would like to represent a third, factor variable by making those
> data points in different symbols according to this variable.  any
> guidance on how to do this would be much appreciated.  the reason i am
> using trellis graphics is that i want the individual points to be
> plotted by treatment, rather than having a boxplot, as the base
> graphics package would plot with a continuous variable ~ a factor
> variable.
>
> an example of my data and the command i am using follows.
>
> dataset is called data
> response variable (y-axis) is FishLength, a continuous variable
> predictor variable (x-axis)  is Treatment, a factor
> third variable, which i would like to be represented via the shape of
> the data point, is Stream, a factor
>
> so far I can only plot the data points against the treatment.
>
>  stripplot(FishLength ~ Treatment, ylab="", xlab="", jitter=TRUE,
> data=data, col="black")
>
> how can i now represent Stream with different shaped data points?
>
> thank you,
> bessie
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Bessie Green Markley
> M.S. Candidate, Dept. of Biology and Wildlife
> Alaska Cooperative Fish and Wildlife Research Unit
> Institute of Arctic Biology
> Sheenjek trailer, N. Koyukuk Drive
> University of Alaska Fairbanks 99775
> 907-474-1949
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


	[[alternative HTML version deleted]]

