'Are data outside the plot region saved in the output pdf file?

pdf('out.pdf')
plot.new()
x=seq(from=-1, to=1, length.out=10)
lines(x, x)
dev.off()

For data outside the plot boundary, are they still saved in the output pdf file but just clipped away? Or they are not saved in the output pdf file? It seems that pdf format have this ability to still save the plot data but just not showing them. So I am wondering how this is handled in base R graphics.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source