Sha256: 4ac6b3a1035f967dcb0a7cde95e530483eeea5810456175d3930e772481ac625

Contents?: true

Size: 628 Bytes

Versions: 7

Compression:

Stored size: 628 Bytes

Contents

require 'nyaplot'

path = File.expand_path("../../notebook/data/first.tab", __FILE__)
df = Nyaplot::DataFrame.from_csv(path, sep="\t")
df.filter! {|row| row[:set1] != 0.0}

plot4=Nyaplot::Plot.new
plot4.add_with_df(df, :histogram, :set1)
plot4.configure do
  height(400)
  x_label('PNR')
  y_label('Frequency')
  filter({target:'x'})
  yrange([0,130])
end

plot5=Nyaplot::Plot.new
plot5.add_with_df(df, :bar, :mutation)
plot5.configure do
  height(400)
  x_label('Mutation types')
  y_label('Frequency')
  yrange([0,100])
end

frame = Nyaplot::Frame.new
frame.add(plot4)
frame.add(plot5)
frame.export_html("multiple_pane.html")

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nyaplot-0.1.6 examples/rb/multiple.rb
nyaplot-0.1.5 examples/rb/multiple.rb
nyaplot-0.1.4 examples/rb/multiple.rb
nyaplot-0.2.0.rc1 examples/rb/multiple.rb
nyaplot-0.1.3 examples/rb/multiple.rb
nyaplot-0.1.2 examples/rb/multiple.rb
nyaplot-0.1.1 examples/rb/multiple.rb