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. Ubuntu下CodeBlocks控制台程序中文显示乱码解决问题

    今天在CodeBlocks下折腾来半天,终于把中文乱码给解决了,其实很简单. 在环境设置里进行如下设置:把Terminal to launch console programs那个选项改成gnome- ...

  2. Mongodb设置账号密码登录

    Mongodb设置.首先设置Data目类和Log目录,然后新建mongodb.conf,设置内容大体如下 port = 27017 #数据目录 dbpath = /usr/softs/data/db ...

  3. MogDB 学习笔记之 -- PITR恢复

    # 概念描述## 背景信息当数据库崩溃或希望回退到数据库之前的某一状态时,MogDB的即时恢复功能(Point-In-Time Recovery,简称PITR)可以支持恢复到备份归档数据之后的任意时间 ...

  4. 【10】python之条件判断

    Python 条件语句是通过一条或多条语句的执行结果(True 或者 False)来决定执行的代码块. Python中没有switch – case语句,也没有三元运算符. 1.if 语句 Pytho ...

  5. 92、kkfile打印当前页

    使用kkfile预览pdf时,有肯能需要打印其中的某一张.如果pdf中有几百张,那么打印加载就会很慢.打印当前页就不会出现这个问题. 这个是我编译后的,有需要的请联系QQ: 1842988062

  6. 整合log4j

    引入依赖 <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId& ...

  7. JAVA笔记:double四舍五入并保留两位小数的方法

    1.只要输出结果 double x1 = 0.026; System.out.println(String.format("%.2f", x1)); 2.数据转换 //方案一: g ...

  8. 腾讯云服务器,在本地域名不能访问,IP可以访问;端口访问差异:有的地方能访问有的不能

    本地域名不能访问原因是DNS地址问题,本地设置的DNS地址没法解析出腾讯云IP,所以域名访问不到,直接就用服务器IP却可以. 修改DNS可以在本地电脑上修改,只影响本机, 按下键盘上的"Wi ...

  9. ue项目--浏览器出现卡顿及崩溃的原因查找与解决方案

    一些内存泄露的情况进行了排查 全局变量 定时器 使用未销毁的全局事件和第三方库 v-if和v-show不合理使用,v-if和v-for不合理使用 使用watch

  10. hdfs操作——hdfs的shell命令和hdfs的JavaAPI操作

    hdfs解决hadoop海量数据的存储. shell 命令(所有hadoop fs 可由 hdfs dfs代替) (1) 在hdfs上创建目录 hadoop fs -mkdir 目录名 (2) 本地文 ...