Measure “ink” of a plot
问题 I am reading on Tufte's data-ink ratio and I was wondering if it is possible to measure the amount of "ink" a plot uses? If not possible in R perhaps with another tool such as GIMP or imagemagick? 回答1: I'd suggest using grid.cap() to convert the contents of the graphics device to a raster, after which it's a simple matter to compute the proportion of non-white pixels (aka "ink"). In the following example, to focus the computations on ink in the plotting area, I've set par(mar=c(0,0,0,0)) ,