r - 如何将 matplot 转换为 ggplot2?
问题描述
我正在学习matplot
和ggplot2
。
我在尝试将 matplot 转换为 ggplot2 时遇到问题
matplot(iris[,1:4],type="l")
legend("topleft",names(iris)[1:4],lty=c(1,2,3,4),col=c(1,2,3,4))
我真的不能把这Species
部分带到ggplot2
。
我怎样才能转换这个?
解决方案
推荐阅读
- python - 为什么 float() 不浮动?
- eclipse - 添加新的类路径容器时,原始类路径不会更新
- r - 如何在相同条件下创建新变量的数据集中创建多个新变量并将其添加到数据集中
- c++ - clang 说调用 void consteval 函数不是常量表达式
- amazon-web-services - 在列表中提供子网并使用 terraform 访问它们
- mysql - MySQL:不能在 SELECT 开始时添加常量字段。错误 1064
- spring-boot - SpringBoot 应用中的哨兵日志配置
- c++ - 在 while 循环中使用数组
- javascript - 通过导入和导出制作最少的工作 JavaScript 代码
- javascript - 反应热重载 node_modules