我正在使用 RPy2 来绘制一些图。绘图显示,但 X11 窗口立即消失。
我输入的所有内容如下,其中CCFS是一个数据矩阵
import rpy2.robjects as robjects
r = robjects.r
pca = r.princomp(CCFS)
r.plot(pca,main="Eigenvalues")
r.biplot(pca,main="biplot")
r['dev.off']() #*EDIT* the problem persists even if I remove this line.
Run Code Online (Sandbox Code Playgroud)
我没有包含一些东西吗?我知道有一些东西要绘制,因为 princomp 返回一个不为空的 ListVector。
我们一直在使用Pro Essentials图形(gigasoft.com),但它与delphi不能很好地兼容,所以它一直在引发问题.
我们需要显示波形和条形图(不是同时显示).波形可能有数千个点.我们需要一些功能齐全的东西,这是一种"活的"产品.
我们的应用程序是本机win32 delphi 2009应用程序.
谢谢你的建议!
我有一个密度图,使用:
plot(density(x))
Run Code Online (Sandbox Code Playgroud)
我感兴趣的是创建一条从x轴到曲线上相应点的x = 5的线.
像这样:

这是使用泰勒级数找到-1和+1之间的角度的正弦值,但我想要做的是让每一个学位的价值,打印,进入下一个程度,然后打印等等......
def Fac(n):
r=1
for c in range(n,1,-1):
r*=c #r=r*c
return r
def Pow(x,n):
r=1
for c in range(0,n):
r*=x
return r
def Sign(i): #i will be the number of the term we are on for Taylor
r=1
for c in range(0,i):
r*=-1
return r
def Rad(a):
return a*3.141592654/180
def SinTerm(x,n,i):
y=Sign(i)*Pow(x,n)/Fac(n)
return y
def main():
for c in range(0,361):
a=c
i=3
n=1
sum=0
for c in range(0,i):
sum+=SinTerm(Rad(a),n,c)
n+=2
print "Taylor COSINE sum = ", sum
while True:
main() …Run Code Online (Sandbox Code Playgroud) 说我有以下数据结构 -
c <- c(1,2)
d <- c(3,5)
e <- c(5,6)
f <- c(4,4)
Run Code Online (Sandbox Code Playgroud)
如何创建分组条形图,使每个数据结构的内容都是并排的条形图.例如,x轴上的第一个标签是C,它上面有1和2的条,D就是下一个,条3和5就是它,依此类推.
任何提示/建议将不胜感激!
graphing ×5
python ×2
r ×2
charts ×1
delphi ×1
delphi-2009 ×1
line ×1
rpy2 ×1
trigonometry ×1
x11 ×1