0
我嘗試使用下面的代碼:紅寶石「statsample」圖形顯示不出來
require 'statsample'
include Statsample::Shorthand
n = 100
x = rnorm(n)
y = x + rnorm(n,0.5,0.2)
Statsample::Graph::Scatterplot.new(x,y)
我得到這樣的輸出:
#<Statsample::Graph::Scatterplot:0x00000003b7cac0 @v2_name=nil, @v1_name=nil, @v1=#<Daru::Vector(100)>
0 -0.8253230853299456
1 1.5602776553658153
2 1.7155337260438381
3 0.9898130381171576
4 0.17150928493368836
有人可以解釋我正在犯什麼錯誤