Method: GnuplotRB::Multiplot#update_plot
- Defined in:
- lib/gnuplotrb/multiplot.rb
#update_plot(position = 0, **options) {|plot| ... } ⇒ Multiplot Also known as: update
Create new updated Multiplot object where plot (Plot or Splot object) at position will be replaced with the new one created from it by updating. To update a plot you can pass some options for it or a block, that should take existing plot (with new options if you gave them) and return a plot too.
Method yields new created Plot or Splot to allow you update it manually.
78 79 80 81 82 83 |
# File 'lib/gnuplotrb/multiplot.rb', line 78 def update_plot(position = 0, **) return self unless block_given? if .empty? replacement = @plots[position].() replacement = yield(replacement) if block_given? replace_plot(position, replacement) end |