Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将Rstudio中水平轴的值更改为科学符号值(使用matplot)_R_Scientific Notation_X Axis - Fatal编程技术网

如何将Rstudio中水平轴的值更改为科学符号值(使用matplot)

如何将Rstudio中水平轴的值更改为科学符号值(使用matplot),r,scientific-notation,x-axis,R,Scientific Notation,X Axis,我有一个绘图,我希望横轴和纵轴都用科学的符号表示。然而,只有垂直轴是(我没有做任何事情,R决定这样做)。我的问题是,是否以及如何手动更改水平轴的值并写入所需的值。我希望在水平轴上有7个数字,从200000到500000,它们应该增加50000(如果这改变了什么,我将使用matplot作为我的绘图)。例如,如果有200000,我想写200000或20e+4 我已经试过了,但运气不好: matplot(x[ord], cbind(lower_hat[ord], g_hat_no_effect

我有一个绘图,我希望横轴和纵轴都用科学的符号表示。然而,只有垂直轴是(我没有做任何事情,R决定这样做)。我的问题是,是否以及如何手动更改水平轴的值并写入所需的值。我希望在水平轴上有7个数字,从200000到500000,它们应该增加50000(如果这改变了什么,我将使用matplot作为我的绘图)。例如,如果有200000,我想写200000或20e+4

我已经试过了,但运气不好:

    matplot(x[ord], cbind(lower_hat[ord], g_hat_no_effects[ord], upper_hat[ord]), type = 'l', col = 1:3, xaxt = "n", xlab="y",ylab="z, c.i.",main="States")
    axis(1, at=seq(200000, 250000, 300000, 350000, 400000, 450000, 500000), labels=c("200,000", "250,000", "300,000", '350,000', "400,000", "450,000", "500,000" ))
任何帮助都将不胜感激。 提前多谢