install.packages("ggplot2")library(ggplot2)# WindRose.R http://stackoverflow.com/questions/17266780/wind-rose-with-ggplot-rrequire(ggplot2)require(RCo...
分类:
其他好文 时间:
2015-04-04 23:46:34
阅读次数:
221
1. 目前有四种主题theme_gray(), theme_bw() , theme_minimal(),theme_classic()2. X轴设置刻度scale_x_continuous(limits=c(1950,2000),breaks=seq(1950,2000,5))3. Bar & L...
分类:
其他好文 时间:
2015-03-19 14:46:23
阅读次数:
172
大家大概都对如下信息图并不陌生,该图用100%堆积面积图的方式来表现不同时期不同国家人数所占的比例。这是一种很有意思的表达方式,而面积图也是很常用的数据图表,现在让我们一起来看看如何在R里用ggplot2和plot.area来制作一个面积图。 在制作图表之前,首先我们先创建一些随机示例数据。...
分类:
其他好文 时间:
2015-03-11 21:12:09
阅读次数:
273
1.用qplot(x,data=data,geom.=”bar”,weight=y)+scale_y_continuous("y")画出y关于x的条形。图中提示binwidth这里是指矩形的宽度,指定之后如下qplot(x,data=data,geom="bar",weight=y,binwidth...
分类:
编程语言 时间:
2015-03-02 16:47:38
阅读次数:
1895
数据sampleflanking mean sd CNV0 365 15 955100 367 15 1018200 369 15.1 1025300 370 15.1 1027400 372 15.2 1031500 373 15.3 1032600 375 15.3 1033700 377 15...
分类:
其他好文 时间:
2015-01-22 00:03:05
阅读次数:
992
3.1 基本条形图library(ggplot2)library(gcookbook)pg_mean #这是用到的数据 group weight 1 ctrl 5.032 2 trt1 4.661 3 trt2 5.526ggplot(pg_mean, aes(x=group, ...
分类:
其他好文 时间:
2014-12-16 16:59:20
阅读次数:
413
library("ggplot2")library("RODBC") #加载RODBC包,读取数据库数据library("sqldf") #sql语句处理数据library("scales")library("reshape2")library(gcookbook) # For the data s...
分类:
其他好文 时间:
2014-11-21 15:51:37
阅读次数:
182
R免费使用;统计工具;# 注释块注释:anything=""编辑器:Rsutdio,Tinn-R,Eclipse+StatET;中文会有乱码?,help; ?boxplot, help(boxplot),help("[[")source('abc.R')library(ggplot2)install...
分类:
编程语言 时间:
2014-10-12 13:30:17
阅读次数:
335
#==============================# ggplot2: subscript in x-axis labels(ticks) rm(list=ls(all=TRUE))library(ggplot2)data <- data.frame(names=tolow...
分类:
其他好文 时间:
2014-10-10 10:01:14
阅读次数:
299
目前主要使用ggplot2做一些数据可视化的分析,但是ggplot2有个很大的缺陷是不支持3D作图,所以需要查找其他替代方案。下面找到的两个替代方案不错,亲测可行,记录于此。交互3Dlibrary(rgl)with(mtcars,{ plot3d(wt, disp, mpg, col="red...
分类:
其他好文 时间:
2014-08-17 16:45:13
阅读次数:
202