rdp / ruby_gnuplot

The ruby gnuplot gem [gnuplot] [rgnuplot] (official releases of the gnuplot gem are from rdp branch)
BSD 3-Clause "New" or "Revised" License
216 stars 48 forks source link

Fix Gnuplot::Plot#[] #53

Closed darthjee closed 4 years ago

darthjee commented 4 years ago

This PR fixes the method Gnuplot::Plot#[]

example:

plot = Gnuplot::Plot.new do |p|
  p.title 'My Title'
  p.unset 'title'
end

plot['title'] # should return nil

The old code was fetching the first occurrence of set title

The tests for this are introduced in #52