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. 用xlutils.copy写入中文的问题

    用xlutils.copy 将中文写入excel文档中 遇到的问题1: Traceback:Traceback (most recent call last):File "C:\Users\ ...

  2. 可汗儿童版kids安卓版下载安装教程

    可汗儿童版kids安卓版幼儿版下载安装教程 点击下面 http://vip.ho27.com/Khan.apk 备用下载链接 天翼网盘下载安装就行 https://cloud.189.cn/t/6RV ...

  3. 关于sql时间方面的处理

    查询大于时间两小时(例:订单设置两小时后过期 $res = Order::where(['status'=>0,'sid'=>1])->whereRaw("created_ ...

  4. 摹客RP,编辑界面缩放比例支持手动输入!

    Hello,小伙伴们,又到了摹客的新功能播报时间. 本月更新,摹客RP编辑界面缩放比例支持手动输入,并对部分组件的默认样式及属性进行了优化:摹客DT率先上线了3款黄金比例图层,辅助设计师更高效绘图:针 ...

  5. Unity Shader实现《死亡搁浅》扫描效果!

    https://mp.weixin.qq.com/s/4YwjxScnU0zprjGekAyvsw

  6. python+requests 验证码登录

    1.先创建一个session req = requests.session() 2.通过session来把验证码下载到本地, code = req.get("https://passport ...

  7. el-pagination分页-自定义左右箭头样式

    1,官方样式: 查了网上,有人说可以用slot插槽,但是试过之后,因为 不能插入多个 slot(没法定义名字做区分),所以导致左右按钮一样了.. 2,还有种方法: 利用 prev-text  和  n ...

  8. redhat用bind配置DNS

    redhat配置bind 1.配置IP地址(这个我这里不写). 2.配置本地yum 3.用yum安装bind,没有nslookup命令的安装bind-utlis.(这里有所以不安装) 4.配置nane ...

  9. feign的工作原理

    1.开发微服务时,我们会在微服务的主程序入口添加EnableFignClient注解开启对Feign Client扫描加载处理,根据FignClient接口规范,定义接口并加上FignClient注解 ...

  10. 使用powerdesigner连接MySQL并设置逆向工程

    使用powerdesigner连接MySQL并设置逆向工程 环境:powerdesigner15.1 MySQL5.7 win10 X64 1.安装mysql-connector-odbc-5.3.8 ...