简体   繁体   中英

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? Try using device.off() or graphics.off() and then start the graphic device again.

If not, i advice you to try this:

  • Add xaxs="i",yaxs="i",xaxt="n",yaxt="n" to your plot parameters.
  • Add this two lines after the plot command:

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

    axis(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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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