Skip to content

3D plots not working in v0.1.6 #75

@v0dro

Description

@v0dro

My code:

require 'nyaplot'
require 'nyaplot3d'
x=[];y=[];z=[]
-10.step(10, 0.5) do |i|
  -10.step(10, 0.5) do |j|
    x.push(i)
    y.push(j)
    z.push(Math.sin(Math.sqrt(i*i+j*j))/Math.sqrt(i*i+j*j))
  end
end
z.map!{|val| next (val.nan? ? 0 : val)} #(0,0) wil

plot = Nyaplot::Plot3D.new
plot.add(:surface, x, y, z)
plot.show

Error:

Javascript error adding output!
TypeError: Cannot read property 'pane' of undefined
See your browser Javascript console for more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions