lib/gnuplotrb/multiplot.rb
##
# Output all the plots to term (if given) or to this Multiplot's own terminal.
#
# @param term [Terminal] Terminal to plot to
# @param multiplot_part [Boolean] placeholder, does not really needed and should not be used
# @param options [Hash] see options in top class docs.
#   Options passed here have priority over already set.
# @return [Multiplot] self
Output all the plots to term (if given) or to this Multiplot's own terminal.
Output all the plots to term ( if given ) or to this Multiplot ' s own terminal .
def plot(term = nil, multiplot_part: false, **options)
      plot_options = mix_options(options) do |plot_opts, mp_opts|
        plot_opts.merge(multiplot: mp_opts.to_h)
      end
      terminal = term || (plot_options[:output] ? Terminal.new : own_terminal)
      multiplot(terminal, plot_options)
      if plot_options[:output]
        terminal.close unless term
        sleep 0.01 until File.size?(plot_options[:output])
      end
      self
    end
def plot ( term = nil , multiplot_part : false , ** options ) plot_options = mix_options ( options ) do | plot_opts , mp_opts | plot_opts . merge ( multiplot : mp_opts . to_h ) end terminal = term || ( plot_options [ :output ] ? Terminal . new : own_terminal ) multiplot ( terminal , plot_options ) if plot_options [ :output ] terminal . close unless term sleep 0.01 until File . size? ( plot_options [ :output ] ) end self end
Output all the plots to term (if given) or to this Multiplot's own terminal.
Output all the plots to term ( if given ) or to this Multiplot ' s own terminal .
# guaranteed wait for plotting to finish # not guaranteed wait for plotting to finish # work bad with terminals like svg and html
None
Multiplot
term
Terminal to plot to
Terminal to plot to
multiplot_part
placeholder, does not really needed and should not be used
placeholder does not really needed and should not be used
options
see options in top class docs. Options passed here have priority over already set.
see options in top class docs . Options passed here have priority over already set .