[genoPlotR-help] genoPlotR plotting question

Lionel Guy lionel.guy at icm.uu.se
Tue Dec 2 12:48:00 CET 2014


Dear Tarah,

Thanks for your interest in genoPlotR. Glad it is useful to you!

The total plotting size is given by the graphical device from R. You can control it when you call the new graphical device (this is not in your code, so I'm guessing here), for example with:

png(width=800, height=300, ...)
[call plot_gene_map() here]
dev.off()

Try playing with width and height to see what fits best.
This will play on the size of the comparison area, the size of the dna_segs is fixed (1 line) and the one of the annotation is given by annotation_height (which you can then increase so that your label fit). 

If you want the whole figure to be tighter, use a larger device size and shrink the figure afterwards (png(width=1600, height=300)...). In general, producing pdfs (pdf() or cairo_pdf() on linux or mac) produces better figures, easier to play with later.

You can have a look at https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/Devices.html to have an idea of the various graphical devices.

If you want to learn (much) more on R Graphics, I recommend the book "R Graphics" by Paul Murrell (https://www.stat.auckland.ac.nz/~paul/RG2e/), which is really great to learn the principles of figure making in R.

Cheers,

Lionel

> On 2 Dec 2014, at 0:17 , Tarah Lynch <Tarah.Lynch at albertahealthservices.ca> wrote:
> 
> Hi Lionel
> 
> I really love the package that you developed! I am very new to R and find your examples very helpful - thanks for making such great documentation to go with it.
> 
> My question is about the plotting part - I'm having trouble figuring out how to reduce increase the margins or vertically compress the 2 dna segments for a tighter figure. Currently I am labelling with products so they are being cutoff.
> 
> I've included my output plot and code. Maybe this is a basic R issue and a dumb question, i apologize if it is.
> 
> I tried adding par(mar) line in plot but the program seams to think I'm trying to put in a tree and I get error about the class of my tree.
> 
> Any advice or just pointing me in the right direction is very much appreciated.
> 
> Thanks in advance,
> 
> Tarah
> 
> 
> This message and any attached documents are only for the use of the intended recipient(s), are confidential and may contain privileged information. Any unauthorized review, use, retransmission, or other disclosure is strictly prohibited. If you have received this message in error, please notify the sender immediately, and then delete the original message. Thank you.
> <Rplot01.png><genoplotR_v1.R>

--
Lionel Guy 
Molecular Evolution, Uppsala University, Uppsala, Sweden
postal address: Box 596, SE-751 24 Uppsala; visiting address: BMC B7:213e, Husargatan 3, SE-752 37 Uppsala
phone: +46 18 471 6129, mobile +46 73 976 0618
lionel.guy at icm.uu.se














More information about the genoPlotR-help mailing list