density plot
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的更多相关文章
- Matplotlib学习---用matplotlib画直方图/密度图(histogram, density plot)
直方图用于展示数据的分布情况,x轴是一个连续变量,y轴是该变量的频次. 下面利用Nathan Yau所著的<鲜活的数据:数据可视化指南>一书中的数据,学习画图. 数据地址:http://d ...
- 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)); %黑色的 ...
- Pandas高级教程之:plot画图详解
目录 简介 基础画图 其他图像 bar stacked bar barh Histograms box Area Scatter Hexagonal bin Pie 在画图中处理NaN数据 其他作图工 ...
- R 绘图 填充颜色
d <- density(mtcars$mpg) plot(d, main="Kernel Density of Miles Per Gallon") polygon(d, ...
- heatmap.2
heatmap.2 {gplots} R Documentation Enhanced Heat Map Description A heat map is a false color image ( ...
- 数据分析与R语言
数据结构 创建向量和矩阵 函数c(), length(), mode(), rbind(), cbind() 求平均值,和,连乘,最值,方差,标准差 函数mean(), sum(), min(), m ...
- 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 ...
- 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 ...
- R的数据图形
R支持4种图形类型: base graphics, grid graphics, lattice graphics, ggplot2. Base graphics是R的默认图形系统. 一. 基本图 ...
- 我的代码-statistic analysis
# coding: utf-8 # In[1]: # numpy and pandas for data manipulationimport numpy as npimport pandas as ...
随机推荐
- Vmware workstation虚拟机导入到esxi虚拟机
VMware Workstation 与 ESXi 的主要区别 VMware Workstation是直接在windows系统下安装软件,安装后再在软件里面安装虚拟机,而ESXi相当于一个linux操 ...
- Django中关于Manager的使用
首先介绍一下 manager 的使用场景,比如我们有一些表级别的,需要重复使用的功能,都可以使用 manager 来实现. 比如我们在前面的笔记中介绍的 model 的 create().update ...
- google filament pbr
https://google.github.io/filament/Filament.md.html
- 【6】python之时间模块
时间模块(time和datetime) 表示时间的方式: 1.时间戳(1970至今的时间间隔总秒数) 2.格式化的字符串(按照固定格式的时间字符串) 3.元组(9个元素形成) ps:UTC世界标准时间 ...
- opencv对图片画框写文字
业务背景:对图片进行画框后调用排序方法按照"从上到下,从左到右"对已经画的框进行排序.排序方法当前有缺陷,修复后需要验证. 目前有如下信息: 原始图片地址 图片对应的每个框的坐标( ...
- 苹果电脑快捷键使用 Mac快捷键大全详细介绍
相信有很多刚开始使用苹果电脑操作系统的用户,都并不了解整个MAC操作系统,就连一般快捷键的使用都不清楚,这让人很感觉很苦恼.分享一下Mac快捷键大全的详细介绍,记住这些常用的快捷键,是你熟悉苹果电脑的 ...
- java 泛型使用
泛型类 // 简单泛型 class Point<T>{ // 此处可以随便写标识符号,T是type的简称 private T var ; public T getVar(){ return ...
- 小程序ios设置map圆角不生效的问题解决方案
给map组件加个view外框,设置如下样式即可 border-radius:10rpx; overflow:hidden; transform: translateY(0);
- python3+selenium+BeautifulReport生成自动化测试报告
https://www.jianshu.com/p/3d2c0e092ffb 自动化测试,最重要的还是测试报告,下面就教大家使用BeautifulReport生成自动化测试报告GitHub:https ...
- Python循环任务,错误打包输出
有时候,多个任务循环在跑,但不想中间任何一个错误,停止主线程,但又想在主线程运行结束后,采集运行过程中所有的错误信息. 这种刁钻的想法,我自问自答,记录一下操作方法. err_list = [] ma ...