简体   繁体   English

轴标签未显示

[英]Axis labels not showing up

I am having trouble with my axis, labels, etc. showing up in my plot.我的坐标轴、标签等出现在我的情节中时遇到了问题。 All I get are the data points.我得到的只是数据点。

My plot is showing up like this:我的情节是这样显示的:

阴谋

My code is this我的代码是这样的

plot(Corr_SIMPIN_clean$PlanSum ~ Corr_SIMPIN_clean$POMP_Score_Flanker, xlab = "PlanSum", ylab = "POMP Score Flanker")

My data looks like this:我的数据如下所示:

数据

As stated, i believe you have something weird at the graphical parameters;如前所述,我相信您对图形参数有些奇怪; do you have any par() lines after opening the graphical device?打开图形设备后你有任何par()行吗? Try using device.off() or graphics.off() and then start the graphic device again.尝试使用device.off()graphics.off()然后再次启动图形设备。

If not, i advice you to try this:如果没有,我建议你试试这个:

  • Add xaxs="i",yaxs="i",xaxt="n",yaxt="n" to your plot parameters.xaxs="i",yaxs="i",xaxt="n",yaxt="n"到您的绘图参数中。
  • Add this two lines after the plot command:在 plot 命令后添加这两行:

    axis(1, xaxp=c(minx,maxx,stepsx))轴(1, xaxp=c(minx,maxx,stepsx))

    axis(2, yaxp=c(miny,maxy,stepsy))轴(2, yaxp=c(miny,maxy,stepsy))

Where minx, maxx, miny, maxy are the boundaries of the axis and stepx, stepy are the number of steps between markers in the axis.其中minx, maxx, miny, maxy是轴的边界, stepx, stepy是轴上标记之间的步数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM