Sha256: 2a4ce973dfcd1f99bd18b3de8b2817542fffc5e5faf6ae7e479ce6caee8b9a94

Contents?: true

Size: 166 Bytes

Versions: 12

Compression:

Stored size: 166 Bytes

Contents

require 'matplotlib/pyplot'

plt = Matplotlib::Pyplot

xs = [*1..100]
ys = xs.map {|x| Math.sin(Math::PI * x / 20.0) + 0.1 * (rand - 0.5) }
plt.plot(xs, ys)
plt.show

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
matplotlib-1.3.0 examples/noisy_sin.rb
matplotlib-1.2.0 examples/noisy_sin.rb
matplotlib-1.1.0 examples/noisy_sin.rb
matplotlib-1.0.0 examples/noisy_sin.rb
matplotlib-0.1.0.alpha.20170426 examples/noisy_sin.rb
matplotlib-0.1.0.alpha.20170419a examples/noisy_sin.rb
matplotlib-0.1.0.alpha.20170311 examples/noisy_sin.rb
matplotlib-0.1.0.alpha.20170309 examples/noisy_sin.rb
matplotlib-0.1.0.alpha.20170307 examples/noisy_sin.rb
matplotlib-0.1.0.alpha.20170302 examples/noisy_sin.rb
matplotlib-0.1.0.alpha.20170226 examples/noisy_sin.rb
matplotlib-0.1.0.alpha.20170224 examples/noisy_sin.rb