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. Mongodb设置账号密码登录

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

  2. centos7 yum安装配置Lnmp和负载配置

    首先配置防火墙CentOS 7.0默认使用的是firewall作为防火墙1.关闭firewall: systemctl stop firewalld.service #停止firewallsystem ...

  3. Vue后台管理项目中解决需要配置多个端口号问题

    背景 登录接口:http://39.98.123.211:8170/ 商品接口:http://39.98.123.211:8510/ 可见前面是地址是一致的,但是端口号不一样. 这就会导致,登录进得去 ...

  4. nginx配置透明代理

    来自:https://blog.csdn.net/weixin_34072458/article/details/91677177 user nginx; worker_processes auto; ...

  5. 简单的python线程池实现线程安全demo

    from concurrent.futures import ThreadPoolExecutor import threading import time import sys sys.path.a ...

  6. ModuleNotFoundError: No module named 'numpy.testing.nosetester'解决方法

    在import numpy的时候编译器提示这个问题. 问题的原因是numpy版本>1.18,而scipy的版本<=0.19 解决方案: 卸载当前版本scipy(0.19),安装更高版本sc ...

  7. zabbix-proxy部署笔记

    前提:配置好yum源 1. 安装mariadb-server systemctl start mariadb.service systemctl enable mariadb.service mysq ...

  8. express的使用:路由、中间件(二)

    13.路由 1.express中的路由指客户端的请求与服务器处理函数间的映射关系 2.express中的路由由请求的类型,请求的URL地址,处理函数组成 3.app.METHOD(PATH,HANDL ...

  9. mybatis纵览

    Mybatis MyBatis 是一款优秀的持久层框架,它支持自定义 SQL.存储过程以及高级映射.MyBatis 免除了几乎所有的 JDBC 代码以及设置参数和获取结果集的工作. MyBatis 可 ...

  10. bzoj 3532

    很好的一道题,对理解最小割有很大帮助 首先,不难发现本题与网络流24题中的某一道很类似,我们可以先跑一次dp求出每个节点的LIS,然后拆点,拆出的两点之间连流量为删除的代价的边,剩下的点之间按dp的转 ...