Finally, I see the intuitiveness of this behavior. When I posted the question, I expect R to resize all the elements inside the graph when I resize the graph.
However, in fact, the size of all elements is fixed, including text, line, label mark, etc., and recalibration of the graph only changes the size of the graph while maintaining the relative position of the elements.
To see this, run pdf("small.pdf",5,5); plot(1,1); dev.off() and pdf("large.pdf",10,10); plot(1,1); dev.off() pdf("small.pdf",5,5); plot(1,1); dev.off() and pdf("large.pdf",10,10); plot(1,1); dev.off() pdf("small.pdf",5,5); plot(1,1); dev.off() and pdf("large.pdf",10,10); plot(1,1); dev.off() . Then, if you show two graphs, increase the scale so that the physical size on the screen is 5x5 and 10x10 , the sizes of the elements should coincide between the two graphs.
So the best practice is probably (please share your practice):
- when building a drawing, indicate the dimensions of the elements that make sense relative to each other,
- when exporting, select the size of the plot in which everything fits
- import into latex using
\includegraphics[width=\textwidth, height=\textheight,keepaspectratio]
Heisenberg
source share