我正在尝试在 JMP 中运行 R 代码来创建一个图。我成功导入了 png 格式的图,但无法调整图的大小。
我可以使用设置的size()来调整png格式的“plot_from_R”; jsl 中的函数,但它不成比例且扭曲。
我怎样才能导入我想要的大小的 plot_from_R?
R Init();
R Submit(
"\[
windows(300,100) #it doesn't work
plot(function(x) dnorm(x), -5, 5, main = "Normal(0,1) Density")
]\"
);
plot_from_R = R Get Graphics("png");
plot_from_R << set size({600, 200}); //it works but the plot is distorted (out of proportion)
New Window("plot_from_R", plot_from_R);
R Term();