Memory leakage in using `ggplot` on large binned datasets
问题 I am making various ggplot s on a very large dataset (much larger than the examples). I created a binning function on both x- and y-axes to enable plotting of such large dataset. In the following example, the memory.size() is recorded at the start. Then the large dataset is simulated as dt . dt 's x2 is plotted against x1 with binning. Plotting is repeated with different subsets of dt . The size of the ploted object is checked by object.size() and stored. After the plotting objects have been