r - Make scatter plots for multiple subsets of data -


I should present my data set and my initial results to better understand your question. My dataset looks like this:

  place species size Conc BT 24 0.2 AST 76 1.4 ... B BT 45 1.2 BST 21 0.7 ...  

every species against each location against size me. For . What I've done uses ggplot2 to create a graph as below:

  scatterplot  

However, in different groups of this graph, It summarizes all the data in the dataset and fails to plot for different locations.

I think the code below

  scatterplot  

just place Work for plotting A And I can do it for different places one by one. However, in my actual dataset, there are many different places in the location variable, and I can not type them all manually one by one. In this way my question is actually how to automatically make those plots for different places once?

Try:

  ggplot (ddf) + geom_point (AES size, conc.) ) + Facet_grid (Place ~ Species)  

Enter the image if there are too many The locations are: </ p> <pre> <code> ggplot (ddf) + geom_point (AES (size, conc., Color = place)) + facet_grid (). Species) </ code> </ pre> <p> <img src =

Or, in a graph:

  ggplot (ddf) + geom_point (AES (size, conc., Color = place, size = species), size = 5)   

Enter image details here


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -