r - {plotrix} - gap.plot - colors and background of points -


i using gap.plot function plotrix package. have following points:

  • circles in black (often written pch=21, col="black")
  • with background in chosen color (e.g. col="red")

however, doesn't seem work on gap.plot:

  • the col set color black
  • but bg not fill background of points chosen color (strangely, color "cut" part of plot, see below).

gap.plot attempts here code, showing various attempts following reading of this link , that link.

edit: better description of question problems are:

  • gap.plot() attempts not have red background
  • points() gives black circle red background, "y" value false (normally y=12.5, here y=21 instead; because of gap).

do know how obtain black circle filled color?

library(plotrix) x=seq(from=0,to=18,by=2) y=rep(15,10) cex=1  ## plots x11() # gap.plot()  pch=21   col="black"   bg="red" gap.plot(x,y+2.5, gap=c(1,9), gap.axis="y", xlim=c(0,25), ylim=c(0,25), type="b",cex=cex,col=rep("black",length(x)),bg=rep("red",length(x)), pch=rep(21,length(x))) text(22,9.5,labels="gap.plot() pch=21",col="blue", cex=0.85)  # gap.plot()  pch=19.  col="black"   bg="red" gap.plot(x,y, gap=c(1,9), gap.axis="y",xlim=c(0,25), ylim=c(0,25),type="b",cex=cex,col=rep("black",length(x)), bg=rep("red",length(x)),pch=rep(19.,length(x)),add=true) text(22,7,labels="gap.plot() pch=19.",col="blue", cex=0.85)  # points()    pch=21   col="black"   bg="red" points(x,y-2.5,type="b",col="black",bg="red",pch=21) text(22,12.5,labels="points() shifted up",col="blue", cex=0.85) 


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -