1

I was recently trying to put together some 'homebrewed' sequence logo plots using R base plotting functions. Using boxplot() I have managed to form boxed weblogo plots similar to what is generated by the weblogo 3.0 software.

Unfortunately, one facet that is difficult to mimic in R is the skew of letters. In sequence logos the letters have y-distortion to indicate their magnitude in bits. I've included an image of what type of skew I am trying to accomplish: sample of skewed text

Is this possible to do using the text() function in R base plotting? I'm imagining there would be an option like y.cex...

plot.new()    

text(0.5, 0.5, "sample text") # <- plotting text in a standard aspect ratio

# text(0.5, 0.5, "skewed text", y.cex=2) <- does an option like this exist?

I looked around for how to perform this sort of text modification, but could not find an example of a solution on stack exchange (or elsewhere), though I may just lack the correct term for this sort of modification.

Thanks for your help!

  • Welcome to Stack Overflow. Could you be more specific? E.g. [provide some data](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610) and code you accomplished so far? – jay.sf Feb 17 '19 at 16:25
  • Thanks for your feedback! I tried to make it a little more clear with an image and code describing my question. I think this will simply be an option i'm unaware of, or that this is not easily accomplished at all. – Nathan Johnson Feb 18 '19 at 01:33

0 Answers0