require 'nyaplot' plot = Nyaplot::Plot.new bar = plot.add(:bar, ['Persian', 'Maine Coon', 'American Shorthair'], [10,20,30]) plot.show plot.x_label("Species") plot.y_label("Number") plot.show colors = Nyaplot::Colors.qual bar.color(colors) plot.show df = Nyaplot::DataFrame.new({species: ['Persian', 'Maine Coon', 'American Shorthair'], number: [10,20,30]}) plot2 = Nyaplot::Plot.new plot2.add_with_df(df, :bar, :species, :number) # x-> column :species, y-> column :number plot2.show