editing a residue cross correlation x axis spacing.

Issue #730 new
Former user created an issue

Hi,

I'm plotting a cross-correlation analysis using:

plot(cij, resno=pdb, contour=FALSE, col.regions=bwr.colors(200), at=seq(-1,1,by=0.01) )

but would like the spacing between residues on the x-axis to be 20 instead of 50 aa.

What would be the easiest way to accomplish that?

Thanks,

Tarsis

Comments (1)

  1. Xinqiu Yao

    Hi,

    You can assign the plot to an object and modify the object directly to change axis ticks. For example,

    p <- plot(cij, resno=pdb, contour=FALSE, col.regions=bwr.colors(200), at=seq(-1,1,by=0.01) )
    
    at <- pretty(1:ncol(cij), n=10)
    at[1] <- 1
    at <- at[at <= ncol(cij)]
    resno <- pdb$atom$resno[pdb$calpha]
    labels <- resno[at]
    
    p$x.scales$at <- at
    p$y.scales$at <- at
    p$x.scales$labels <- labels
    p$y.scales$labels <- labels
    
    p
    

  2. Log in to comment