# R: How to plot data grouped by a factor, but not as a boxplot

Filed under:
|
##### plotting

In R, given a vector

``````casp6 <- c(0.9478638, 0.7477657, 0.9742675, 0.9008372, 0.4873001, 0.5097587, 0.6476510, 0.4552577, 0.5578296, 0.5728478, 0.1927945, 0.2624068, 0.2732615)
``````

and a factor:

``````trans.factor <- factor (rep (c("t0", "t12", "t24", "t72"), c(4,3,3,3)))
``````

I want to create a plot where the data points are grouped as defined by the factor. So the categories should be on the x-axis, values in the same category should have the same x coordinate.

Simply doing `plot(trans.factor, casp6)` does almost what I want, it produces a boxplot, but I want to see the individual data points.

© Stack Overflow or respective owner

• #### Techniques and algorithms for precise and efficient graph plotting

as seen on Stack Overflow - Search for 'Stack Overflow'
I'd like to plot mathematical functions and I'm looking for techniques and algorithms for precise and efficient plotting. 2D plotting should suffice. I focus on techniques and algorithms, not libraries or languages. Thanks in advance! >>> More

• #### Plotting multi-colored line in Matlab

as seen on Stack Overflow - Search for 'Stack Overflow'
I would like to plot a line with two-color dashes, say red-blue-red-blue-... I know I could do it like this: plot([1,2],[1,2],'r'), hold on, plot([1,2],[1,2],'--b') However, since I need to be able to move the line, among others, it should only have a single handle. How could I do this? >>> More

• #### Video: Plotting Map Markers Dynamically Using the Google Maps API, jQuery, PHP, and MySQL

as seen on Internet.com - Search for 'Internet.com'
Learn how to add Google Maps markers and store their coordinates in a database using a blend of jQuery, PHP and MySQL. >>> More