我对R完全陌生,我一直在尝试将一个数据集切割到我感兴趣的字段中,然后绘制其中的barplot()。
问题是,我遇到了错误,我不能继续下去了。
这是我的密码:
data = infert; # Get a local copy of infert so we can edit stuff.
data <- data[data$case == 0, ]; # Split the data to those that interest us,
# in this case
我有一些一定年份的商店的销售数据,我想绘制它的每月销售数据。这里我有DateTime对象,所以通过这个,我绘制了这样的图
wlmrt['Date'].dt.month.value_counts().sort_index().plot()
# Here it's output actually it's output is graph but to show its error I am showing it's value
1 450
2 495
3 540
4 630
5 585
6 540
7
我可以使用UpsetR包来生成基本和属性翻转图。但是,我无法使用测量数据生成绘图。有没有人尝试过在调查数据中绘制颠覆性的曲线图?谢谢。
我的错误是:
"cannot coerce class ‘c("survey.design2", "survey.design")’ to a data.frame".
我是R的初学者,我正在努力将我的一些数据表示为一个饼图。饼图不是圆形的,而是由不同长度(或半径)的扇区组成。如果这一点不清楚,很抱歉。
下面是我的代码:
ggplot(data, aes(x=Effects)) +
geom_bar(stat="count") +
coord_polar("x") +
xlab("Type of effects") +
ylab("Number of references") +
ggtitle("Numbers of references by type o
下面是我想为之绘制PDF的数据。
下面是脚本
import numpy as np
import matplotlib.pyplot as plt
import pylab
data = np.loadtxt('64_general.out')
H,X1 = np.histogram( data, bins = 10, normed = True, density = True) # Is this the right way to get the PDF ?
plt.xlabel('Latency')
plt.ylabel('PDF')
pl