graphics - Suppress redraw when calling polygon in R -
I want to attract 60,000+ non-overlapping triangles (part of an unstructured triangular trap) in a plot in R. Currently, it takes 15-20 minutes per plot, which makes it impossible to use it to make animations. For example,
n & lt; - 100 # copy it to 60,000 x Is it possible to suppress polygon () by recycling after polygon? I'm guessing this is the most time-consuming step, and it is not mentioned in the man page. Alternative tips will be appreciated on how to achieve this. Thank you.
You can pass multiple polygons at polygon . Separation of what you have to do is different from NA . Here's a code: Cut < P> Works fast I tested to control the seed and compare with the plot generated by your code.
Comments
Post a Comment