FIN=read.table("/Users/zhongyuantian/macshare/workSpace2021/1.TFY/1.3.TFY20201215/1.3.1.TFY1C_TFY1_OPTIMISE/GENENUMinMTForRAID/MTF1135.bed.hitby_Brown_alliso.hit.uniqGENE.AI.uniqCOUNT")
colnames(FIN)<-c("MTF","AI","genecount")
tail(FIN)
library(ggplot2)
library(scales)
library(dplyr)
FINA<-FIN%>%filter(AI=="A") VCTA=FINA$genecount
tfmaxyA=(which.max(density(VCTA)$y))
tfmaxxA=(density(VCTA)$x[which.max(density(VCTA)$y)])
PLOTA_MTFGENECOUNT<-ggplot(FINA,aes(genecount))+
xlab("TF1C length (bp)")+
geom_density(color = "black",aes(y=..scaled..))+
geom_vline(xintercept = tfmaxxA,col="blue",linetype=2)+
geom_text(aes(x=tfmaxxA,y=0,label=comma(tfmaxxA)),col="navy",hjust=-0.1,vjust=-0.5)+ #scale_x_continuous( breaks = pretty_breaks(10),labels=unit_format(unit = "k", scale = 1e-3, sep = ""))+
# coord_cartesian(xlim=c(0,650000))+
theme_bw()+
theme(panel.grid = element_blank())
PLOTA_MTFGENECOUNT
head (FINA)

density plot的更多相关文章

  1. Matplotlib学习---用matplotlib画直方图/密度图(histogram, density plot)

    直方图用于展示数据的分布情况,x轴是一个连续变量,y轴是该变量的频次. 下面利用Nathan Yau所著的<鲜活的数据:数据可视化指南>一书中的数据,学习画图. 数据地址:http://d ...

  2. MATLAB中mesh函数的使用:基于像素强度画3D密度图(create a 3D density plot based on the pixel intensity:mesh function)

    所用的函数非常简单,只需要用到mesh函数,示例代码如下: Ima=imread('F:\pathto\test.jpg'); surf_ima = surf(rgb2gray(Ima)); %黑色的 ...

  3. Pandas高级教程之:plot画图详解

    目录 简介 基础画图 其他图像 bar stacked bar barh Histograms box Area Scatter Hexagonal bin Pie 在画图中处理NaN数据 其他作图工 ...

  4. R 绘图 填充颜色

    d <- density(mtcars$mpg) plot(d, main="Kernel Density of Miles Per Gallon") polygon(d, ...

  5. heatmap.2

    heatmap.2 {gplots} R Documentation Enhanced Heat Map Description A heat map is a false color image ( ...

  6. 数据分析与R语言

    数据结构 创建向量和矩阵 函数c(), length(), mode(), rbind(), cbind() 求平均值,和,连乘,最值,方差,标准差 函数mean(), sum(), min(), m ...

  7. DATA VISUALIZATION – PART 2

    A Quick Overview of the ggplot2 Package in R While it will be important to focus on theory, I want t ...

  8. How to use data analysis for machine learning (example, part 1)

    In my last article, I stated that for practitioners (as opposed to theorists), the real prerequisite ...

  9. R的数据图形

    R支持4种图形类型: base graphics, grid graphics, lattice graphics,  ggplot2. Base graphics是R的默认图形系统. 一.  基本图 ...

  10. 我的代码-statistic analysis

    # coding: utf-8 # In[1]: # numpy and pandas for data manipulationimport numpy as npimport pandas as ...

随机推荐

  1. Kubernetes基础配置管理

    一.ConfigMap创建 1-1.基于目录创建ConfigMap 首先创建一个configmap/conf存储目录,分别建立.conf文件 mkdir /configmap/conf #创建.con ...

  2. Day 11 11.1 Xpath解析

    xpath解析 xpath在Python的爬虫学习中,起着举足轻重的地位,对比正则表达式 re两者可以完成同样的工作,实现的功能也差不多,但xpath明显比re具有优势,在网页分析上使re退居二线. ...

  3. yzh 总线选讲

    分布式:通过总线,我们可以用"通信""消息"等视角,把各个模块拆成各个小状态机,每个小状态机互相之间独立,通过总线通信 集中式:通过一个大状态机生成所有控制信号 ...

  4. Could not resolve dependency:peer swiper@“^5.2.0“ from vue-awesome-swiper@4.1.1

    在安装vue-awesome-swiper时报错: Could not resolve dependency:peer swiper@"^5.2.0" from vue-aweso ...

  5. ubuntu的vsftpd

    先输入vsftp -v查看自己的ubuntu是不是已经安装了vsftpd 没有安装的样子 安装的样子 如果没有安装先安装,输入下面的东西 apt-get install vsftpd 进行安装,安装好 ...

  6. BFS板子题

    #include <iostream> #include <string> #include <queue> using namespace std; int n, ...

  7. QSlider CSS样式

    QSlider::groove:horizontal{ border:0px; height:15px; background:#deffe5; } QSlider::sub-page:horizon ...

  8. Swift中 堆(heap)和栈(stack)的区别

    1.内存空间分为堆空间和栈空间 2.堆->引用类型(对象.函数.闭包)  栈->值类型(结构体.枚举.元组) 3.值类型赋值->深拷贝  引用类型赋值->浅拷贝 let a = ...

  9. Oracle 数据库升级过程中的主要步骤

    Oracle 数据库升级包括六个主要步骤. Oracle 数据库的升级步骤工作流 步骤 1:准备升级 Oracle 数据库 熟悉 Oracle 数据库新版本的特性. 确定新版本的升级路径. 选择升级方 ...

  10. 如何用jupyter打开代码并租用服务器进行运行

    1.启用环境并打开项目 s1:打开anaconda,进入到anaconda prompt命令窗口: s2:(我的代码是pytorch,所以我的环境也是pytorch) a.激活环境:conda act ...