def run(s,data=nil)
    res = send_cmd(s,data)
    if !res.empty?
      if /.*?End\sof\sanimation\ssequence.*?/im =~ res.to_s
        return nil
      end
      if res.size < 7
        if /^\s*(line \d+: )?warning:/i =~ res[0]
          $stderr.puts res.join.strip
          return nil
        else
          msg = "\n"+res.join.strip
        end
      else
        msg = "\n"+res[0..5].join.strip+"\n :\n"
      end
      kernel_raise GnuplotError,msg
    end
    nil
  end
def run(s,data=nil)
    res = send_cmd(s,data)
    if !res.empty?
      if /.*?End\sof\sanimation\ssequence.*?/im =~ res.to_s
        return nil
      end
      if res.size < 7
        if /^\s*(line \d+: )?warning:/i =~ res[0]
          $stderr.puts res.join.strip
          return nil
        else
          msg = "\n"+res.join.strip
        end
      else
        msg = "\n"+res[0..5].join.strip+"\n :\n"
      end
      kernel_raise GnuplotError,msg
    end
    nil
  end
private methods