lib/gnuplotrb/staff/terminal.rb
##
# Output datablock to this gnuplot terminal.
#
# @param data [String] data stored in datablock
# @example
#   data = "1 1\n2 4\n3 9"
#   Terminal.new.store_datablock(data)
#   #=> returns '$DATA1'
#   #=> outputs to gnuplot:
#   #=>   $DATA1 << EOD
#   #=>   1 1
#   #=>   2 4
#   #=>   3 9
#   #=>   EOD
Output datablock to this gnuplot terminal.
Output datablock to this gnuplot terminal .
def store_datablock(data)
      name = "$DATA#{@current_datablock += 1}"
      stream_puts "#{name} << EOD"
      stream_puts data
      stream_puts 'EOD'
      name
    end
def store_datablock ( data ) name = "$DATA#{@current_datablock += 1}" stream_puts "#{name} << EOD" stream_puts data stream_puts 'EOD' name end
Output datablock to this gnuplot terminal.
Output datablock to this gnuplot terminal .
data
data stored in datablock
data stored in datablock
example
None