Changing the x axis size using tracks (ggbio)
1
0
Entering edit mode
@vinicius-henrique-da-silva-6713
Last seen 10 months ago
Brazil
Hello, I am using the tracks function from ggbio package, but I am unable to change the size in the x axis. The df dataframe: chr start end id chr12 72065147 72204484 ENSBTAG00000045751 chr12 72529373 72690449 ENSBTAG00000047181 chr12 73574461 73704802 ENSBTAG00000046041 chr12 73890111 73977633 ENSBTAG00000047764 chr12 74198711 74199129 ENSBTAG00000047360 chr12 74816044 74978179 ENSBTAG00000023309 chr12 75457896 75536848 ENSBTAG00000026070 chr12 75664651 75870596 ENSBTAG00000039714 chr12 76758753 76864805 ENSBTAG00000003568 chr12 76867833 76922959 ENSBTAG00000003569 chr12 76958977 77024110 ENSBTAG00000012065 chr12 77032585 77176916 ENSBTAG00000004401 gr <- makeGRangesFromDataFrame(df, TRUE) ex <- autoplot(gr, ylab = "Soft") + theme(text = element_text(size=20)) tracks(ex) In this example just the y axis in changed by theme (size =20). The x axis continues very small. Interestingly if I don?t use tracks function the two axis (x and y) change normally to my desired size (size =20). However, I have several tracks in my actual data, which coerce me to use tracks function. Any ideas why it is not working? Thank you very much! -- Vinicius [[alternative HTML version deleted]]
ggbio • 1.0k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 17 minutes ago
United States

Hi Vinicius,

I don't have that problem:

> ex <- autoplot(gr, ylab = "Soft")
> ex

and

> ex+theme(text = element_text(size=20))

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] XVector_0.4.0        GenomicRanges_1.16.3 GenomeInfoDb_1.0.2   IRanges_1.22.9       ggbio_1.12.8        
[6] ggplot2_1.0.0        BiocGenerics_0.10.0 

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.26.0     BatchJobs_1.2            BBmisc_1.7               Biobase_2.24.0          
 [5] BiocParallel_0.6.1       biomaRt_2.20.0           Biostrings_2.32.1        biovizBase_1.12.1       
 [9] bitops_1.0-6             brew_1.0-6               BSgenome_1.32.0          checkmate_1.1           
[13] cluster_1.15.2           codetools_0.2-8          colorspace_1.2-4         DBI_0.2-7               
[17] dichromat_2.0-0          digest_0.6.4             fail_1.2                 foreach_1.4.2           
[21] Formula_1.1-1            GenomicAlignments_1.0.2  GenomicFeatures_1.16.2   grid_3.1.0              
[25] gridExtra_0.9.1          gtable_0.1.2             Hmisc_3.14-4             iterators_1.0.7         
[29] lattice_0.20-29          latticeExtra_0.6-26      MASS_7.3-31              munsell_0.4.2           
[33] plyr_1.8.1               proto_0.3-10             RColorBrewer_1.0-5       Rcpp_0.11.2             
[37] RCurl_1.95-4.1           reshape2_1.4             Rsamtools_1.16.1         RSQLite_0.11.4          
[41] rtracklayer_1.24.2       scales_0.2.4             sendmailR_1.1-2          splines_3.1.0           
[45] stats4_3.1.0             stringr_0.6.2            survival_2.37-7          tools_3.1.0             
[49] VariantAnnotation_1.10.5 XML_3.98-1.1             zlibbioc_1.10.0         
ADD COMMENT

Login before adding your answer.

Traffic: 784 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6