require 'rbplotly' trace1 = { x: [1,2,3,4,5,6], y: [100,200,300,400,500,600] } trace2 = { x: [1,2,3,4,5,6], y: [600,500,400,300,200,100] } traces = [trace1, trace2] pl = Plotly::Plot.new(data: traces) pl.show require 'daru' df = Daru::DataFrame.from_csv('O_TUKIBETSU_NENREI.csv') require 'daru/plotly' include Daru::Plotly::Methods plot(df, x: 'age', y: 'total_count').show plot(df, x: 'age', y: ['total_count', 'male', 'female']).show