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 ...
随机推荐
- windows中的换行符和Linux中的换行符
# cat -A tmp.tmp 120.4987 12.717858^M$ ^M 对应的字符是 \r # cat tmp.txt | awk -vRS='\r\n' '{print $2,$1}' ...
- IDEA通过Spring Initalizr新建SSM (2)
之前的方式是通过官网初始化demo(URL:https://start.spring.io/)现在记录一下通过IDEA自带的初始化器新建SSM框架 1.打开IDEA,点击新建,出现如下图菜单,点击Sp ...
- vue3.0使用富文本编辑器VueQuill
1. npm install @vueup/vue-quill@alpha --save 2. 在main.js中全局引入 import { QuillEditor } from '@vueup/vu ...
- HOW TO RENDER TO A TEXTURE ARRAY IN UNITY
http://xdpixel.com/how-to-render-to-a-texture-array-in-unity/
- 使用Echarts 动态更新散点图
最近遇到一个作业,要求使用 Echarts 散点图,本来这个图是很容易的,官网上也有很多的教程.但是如果可以动态的更新 Echarts 散点图就更好了.我本身对 js 不感兴趣,经过不停的查找资料最终 ...
- gRPC service 和client需要引用的包
gPRC service 在ASP.NET Core中使用 直接引用Grpc.AspNetCore,该包含有Google.Protobuf.Grpc.AspNetCore.Server.ClientF ...
- 动画图解 Git 的 10 大命令
原文地址:https://dev.to/lydiahallie/cs-visualized-useful-git-commands-37p1 原文作者:Lydia Hallie 前言 尽管 Git 是 ...
- 整合mybatis实现简单的增删改查
mybatis配置相关代码 配置 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE conf ...
- 移动端唤起QQ聊天
var u = navigator.userAgent; var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); if(isiOS){ if(u ...
- node.js请求css、js静态资源页面不生效
产生原因:文件响应头内容类型错误 解决方案:设置对应的响应头内容类型 const http = require('http'); const fs = require('fs'); const pat ...