Shannon entropy Score: offset of x-axis
Following the instructions given in: http://thegrantlab.org/bio3d/html/entropy.html
Given that my alignment dimensions are: 9 sequence rows; 143 position columns (112 non-gap, 31 gap) and
length(con$seq) [1] 143
I've set: barplot(H, border="white", ylab = "Entropy", space=0, xlim=c(0.0, 143.0),yaxt="n" ) and axis(side=3, at=(seq(0,length(con$seq),by=5)-0.5), labels=seq(0,length(con$seq),by=5))
For plot2 the axis is set as: axis(side=3, at=c(1:length(con$seq)), labels =con$seq)
I'm attaching the generated image where it can be seen that the x-axis of the barplot is not the same as the x-axis of the image.
I experimented by changing the offset from -0.5 to different values to no avail.
Any suggestions as to the origin of the problem would be most useful.
Thank you in advance
George
Comments (3)
-
-
Formatting a plot. Not a bug.
-
- changed status to resolved
- Log in to comment
Try to narrow the "xlim" range in the barplot, too, in addition to adjusting the offset of axis ticks. It should help align them better.