Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method on basic example #11

Open
WilyWildWilly opened this issue Jul 12, 2020 · 0 comments
Open

NoMethodError: undefined method on basic example #11

WilyWildWilly opened this issue Jul 12, 2020 · 0 comments

Comments

@WilyWildWilly
Copy link

On an iRuby notebook (IRuby 0.4.0, Ruby 2.7.0, Ubuntu 18.04.1), while following the first tutorial on Nyaplot diagrams, as I try to use a DataFrame i get a NoMethodError: undefined method `<' for nil:NilClass

The code I try to run:

plot2 = Nyaplot::Plot.new
plot2.add_with_df(df, :bar, :species, :number) # x-> column :species, y-> column :number
plot2.show

The error I get (full trace):

NoMethodError: undefined method <' for nil:NilClass /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot/diagram.rb:70:in process_data'
/home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot/diagram.rb:16:in initialize' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot/plot.rb:75:in new'
/home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot/plot.rb:75:in `add_with_df'

:1:in `' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/lib/iruby/backend.rb:44:in `eval' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/lib/iruby/backend.rb:44:in `eval' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/lib/iruby/backend.rb:12:in `eval' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/lib/iruby/kernel.rb:90:in `execute_request' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/lib/iruby/kernel.rb:49:in `dispatch' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/lib/iruby/kernel.rb:38:in `run' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/lib/iruby/command.rb:110:in `run_kernel' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/lib/iruby/command.rb:40:in `run' /home/xxx/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/iruby-0.4.0/bin/iruby:5:in `' /home/xxx/.rbenv/versions/2.7.0/bin/iruby:23:in `load' /home/xxx/.rbenv/versions/2.7.0/bin/iruby:23:in `'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant