How to translate point size in cex into units of plot in R

烂漫一生 提交于 2021-02-10 17:57:53

问题


I try to figure out how big the radii of the points in my plot in x and y direction are going to be, with their size being set by cex.

I want to create a plotting function which needs this information. It appears to me as if cex would be this magical parameter and nobody actually knows what exactly it is going to do.

I am creating a plot with the png function. I set a graph width and height. I set par(mar) and par(oma). I plot an empty plot with an xlim and ylim being set, and add an additional xaxs = "i" and yaxs = "i". Then I add points.

So, my question: How can I deduce from my graph width and height (set in pixels or inches?), my mar and oma settings (what is their unit???) and my xlims and ylims what the extent of e.g. a point with cex = 2 is going to be?

Thanks!

来源:https://stackoverflow.com/questions/51200677/how-to-translate-point-size-in-cex-into-units-of-plot-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!