質問

I feel like this may be a dumb question but I have spent a long time looking for an answer and can't seem to find one. It's hard even to know what to search for so if this is answered somewhere else that you know of, a link is all I need.

However. I am trying to do a simple CA in R using the vegan package and it works fine. However, the plot I generate only shows 60 "sites" when in reality I have 135. Does anyone know why this might happen? I need to be able to show all of the objects. My code is below

library(vegan)
CPUE.matrix <- read.csv("CPUE_Matrix_CA.csv", header=TRUE, row.names=1)
cpue.ca <- cca(CPUE.matrix)
plot(cpue.ca, type="n")
points(cpue.ca, display = "sites", cex = 1.3,  bg=labels, pch=20, col="red")
text(cpue.ca, display = "spec", cex=0.9, col="black")

To give you an idea of what my data look like:

head(CPUE.matrix)

       Black.Rockfish Brown.Rockfish Copper.Rockfish Pacific.Cod
1974_G57       0.000000      0.0000000       0.4731183        0.00
1974_H66       0.000000      1.6666667       2.0000000        0.00
1974_H67       0.000000      0.0000000       0.0000000        0.00
1974_H78       2.726236      0.0000000       2.6171869        0.00
1974_H79       0.000000      0.5660377       0.0000000        0.00
1974_H80       0.000000      0.1600000       0.0000000        0.08
         Quillback.Rockfish
1974_G57          0.5677419
1974_H66          0.6666667
1974_H67          0.6037736

The data are 5 species of fish, 135 locations and the catch per unit effort of each species at each location in the cells. When I plot, not enough of the locations show up in the plot.

役に立ちましたか?

解決

Just to allow closing out the question: as in the coments thread, it turns out that many sites were overlapping each other. One way to make this more obvious, as has been mentioned in other SO questions, is to plot with partial transparency. In that way, overlapping items will appear darker than a single item. See, for example, R: Scatterplot with too many points

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top