Skip to main content

Posts

Showing posts from November, 2012

Matlab plot figure modifying tips pixed dpi relationship

Matlab  plot figure all basic operation =========================== x = [1:5]; y = [7 8 1 9  10] h =figure plot(x,y) hold on plot(x, y+5); % change axis properties set(gca,'box','off'); % remove box around figure set(gca,'FontSize',fontsize_tick-1); % set tick size in figure set(gca,'LooseInset',get(gca,'TightInset'));  % if you want to remove space on right of figure xlabel(commonLabelWindow,'fontsize' , fontsize_label); ylabel('Average AT-skew','fontsize' , fontsize_label_special); xlim ( [ min(myX)   max(myX)]) ylim ( [ min( [myY1  myY2  ])   max([ myY1  myY2  ])  ]) % change size of figure http://www.mathworks.com/help/matlab/creating_plots/positioning-figures.html %  set size of figure's "drawing" area on screen ( 5.5 cm  width ) by ( 4.0 cm height) set(gcf, 'Units','centimeters', 'Position',[0 0 5.5 4.0]) % change resolution 600 dpi http

R tutorial

Install R in linux ============ In CRAN home page, the latest version is not available. So, in fedora, Open the terminal yum list R  --> To check the latest available version of r yum install R --> install R version yum update R --> update current version to latest one 0 find help ============ ?exact topic name (  i.e.   ?mean ) 0.0 INSTALL 3rd party package  ==================== install.packages('mvtnorm' , dependencies = TRUE , lib='/home/alamt/myRlibrary/')   #  install new package BED file parsing (Always use read.delim it is the best) library(MASS) #library(ggplot2) dirRoot="D:/research/F5shortRNA/TestRIKEN/Rscripts/" dirData="D:/research/F5shortRNA/TestRIKEN/" setwd(dirRoot) getwd() myBed="test.bed" fnmBed=paste(dirData, myBed, sep="") # ccdsHh19.bed   tmp.bed ## Read bed use read.delim - it is the  best mybed=read.delim(fnmBed, header = FALSE, sep = "\t", quote = &q