gnuplot gem で XY 座標ボードを描画しようとしていますが、コードを実行すると自動的に閉じてしまいます。私は例をチェックしていて、私はすべてうまくいっていると思います.私のgnuplotウィンドウがもっと見えるようにするのを手伝ってくれる人はいますか? 私は睡眠を試みてきましたが、それを理解することはできません.なぜそれがまだ失敗するのですか.
Gnuplot.open do |gp|
# Start a new plot
Gnuplot::Plot.new(gp) do |plot|
plot.title fn
# plot.grid
# Plot each cluster's points
clusters.each do |cluster|
# Collect all x and y coords for this cluster
x = cluster.points.collect {|p| p.x }
y = cluster.points.collect {|p| p.y }
# Plot w/o a title (clutters things up)
plot.data << Gnuplot::DataSet.new([x,y]) do |ds|
ds.notitle
end
end
end
end