Search code examples
rplotvegan

Cropped linestack plot (vegan)


Problem:

I am using the linestack plot from the vegan package. For higher number of data/labels the plot gets cropped.

Reproducable Example:

library(vegan)
linestack(x= 1:100, labels = 1:100)

enter image description here

Question: How can I get the complete plot including all values/labels (1:13 and 85:100) without crop?


Solution

  • you have two choices. First, you can just make your plotting device larger. If you're drawing to the screen, make the plot window larger and re-run the commands. If you're exporting via png() or pdf() or something, just make the dimensions larger (taller). Your second option is to make the font size smaller. linestack appears to use base graphics so do

    par(ps=8)
    linestack(x= 1:100, labels = 1:100)