ggplot2为什么会给出一个空图?

问题描述

import pandas as pd
>>> data = pd.Series([1,2,3,4],index=['a','b','c','d'])
>>> data
a    1
b    2
c    3
d    4
dtype: int64
>>> data *= 2
>>> data
a    2
b    4
c    6
d    8
>>> data['a']
2

大家好,我是R的新手,所以我尝试做这个分析board_game的项目。我真的很好奇我做错了哪一部分导致了完全空白的图形。任何帮助将不胜感激!

解决方法

修改:

 ggplot(data=board_game,Mapping = aes(x = board_game$average_complexity,y = board_game$average_rating)) 

阅读:

 ggplot(data=board_game,Mapping = aes(x = average_complexity,y = average_rating))

...如果我有美元...

,

我认为您忘记了其中之一)

看看y的末尾= board_game $ average_rating))我放了两个,然后在末尾删除了一个

rating_complexities_graph<- ggplot(data=board_game,aes(x = average_complexity,y = average_rating)) + geom_point()

另外,我认为您不需要打印命令。只需调用您创建的变量

rating_complexities_graph