ggplot2 theme相关设置—线条设置
在ggplot的主题射中有一部分图需要对图中的部分线条进行设置
element_line(colour = NULL, size = NULL, linetype = NULL, lineend = NULL) 参数基本属于正常的线条设置的形式。 下面来看个例子
library(ggplot2)
p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point()
p
p+theme(axis.line.x=element_line(linetype=1,color="blue",size=1),
axis.ticks.y=element_line(color="red",size=1,lineend = 22))
可以看出x轴的边界线颜色被改变,以及y轴的刻度也被改变
p+theme(panel.grid.major=element_line(size=1,linetype =3,color="green"),
panel.grid.minor=element_line(size=1,linetype =3,color="blue"))
这里图片美观先不提,主要是想通过设置了解每个线条设置的作用,从图中可以看出线条格式已经发生改变。
ggplot2 theme相关设置—线条设置的更多相关文章
- ggplot2 theme相关设置—矩形设置(rect)
在主题设置中,rect设置主要用于设置图例和面板 element_rect(fill = NULL, colour = NULL, size = NULL, linetype = NULL, colo ...
- ggplot2 theme相关设置—文本调整
在geom设置和scale设置之后,要想把图画的漂亮,theme设置是比不可少的 在theme 设置中element_text()是一项很重要的内容 element_text(family = NUL ...
- ggplot2 scale相关设置-坐标转换
ggplot2 scale相关设置-坐标转换 在R中坐标轴转换有多种形式,包括对数转换,平方根转换以及坐标刻度前后进行调换 用到的函数分别有: scale_x_log10(...) scale_y_l ...
- ggplot2 scale相关设置
ggplot2 scale相关设置 标度设置:主要用于在ggplot画图后的各个图层进行调整设置. 1.相关属性scale设置 包括scale_size().scale_alpha().scal ...
- 关于Makefile.am中与Build相关的变量设置 AM_CPPFLAGS
http://tonybai.com/2010/10/26/about-variables-related-to-building-in-makefile-am/ 关于Makefile.am中与Bui ...
- dedecms调用全站相关文章怎么设置
前面我们说了dedecms调用相关文章,但很多网友反映说调用的只是本栏目的相关文章,不是全站的相关文章,那么dedecms调用全站相关文章怎么设置呢?打开文件\include\taglib\likea ...
- android studio eclipse keymap theme 快捷键 主题风格设置
android studio eclipse keymap theme 快捷键 主题风格设置 将Android Studio的快捷键设置与eclipse一致,使用习惯的快捷键才顺手.Mac系统下:进入 ...
- canvas设置线条样式
canvas设置线条样式 合法属性和方法 lineWidth = value 设置线宽 lineCap = type 设置线端点样式 lineJoin = type 设置线交合处样式 setLineD ...
- echarts设置线条粗细
series: [ { name:"buy", type:'line', data:[], itemStyle: { normal: { color: '#6cb041', lin ...
随机推荐
- Attribute value is quoted with " which must be escaped when used within the value 问题解决
访问JSP时,报错:Attribute value is quoted with " which must be escaped when used within the value .相信 ...
- 反编译与调试APK
0×01前言 这年头,apk全都是加密啊,加壳啊,反调试啊,小伙伴们表示已经不能愉快的玩耍了.静态分析越来越不靠谱了,apktool.ApkIDE.jd GUI.dex2jar等已经无法满足大家的需求 ...
- python3中字典的copy
字典是可变的: first和second同时指向一个字典.first修改也会影响second.在程序中一定注意对字典参数的修改会对原始的字典进行修改.这也体现了字典是可变的. 字典的copy方法是浅拷 ...
- 免费SSL证书申请
https://buy.wosign.com/free/#apply 和 http://www.startssl.com/
- top batch output
echo 3 > sudo tee /proc/sys/vm/drop_caches top -d30 -bn20 > a
- jetbrain phpstorm 增加或删除一个 live template
打开\.PhpStorm2016.2\config\templates 将xml文件放入该文件夹中 重启! 单独: setting -> editor -> Live Template +
- checkbox批量操作
hang=data.split("\1");//获取 查询返回的数据 处理数据 var str=""; for(var i =0;i<hang.lengt ...
- 快乐编程学ruby
人们常说:不忘初心,方得始终.所以,code除了完成工作任务,在最初还应该是富于乐趣的,正所谓,宅男配女仆,我们来了解了解我们的ruby 萌妹子吧:-). ...
- Qt实现悬浮窗效果
当鼠标移动到头像控件时,显示悬浮窗,当鼠标离开时,悬浮窗隐藏. 1.控件选择 悬浮窗可以从QDialog派生,并将窗口的属性设置为无边框 this->setWindowFlags(this- ...
- DIV+CSS 让同一行的图片和文字对齐
在div+css布局中,如果一行(或一个DIV)内容中有图片和文字的话,图片和文字往往会一个在上一个在下,这是一个新手都会遇到问题,我的解决方法有三: 1.添加CSS属性:vertical-align ...