def plot(*args, glob_vars={}, printer=ConsolePrinter()): splitted = seperate_by_keywords(args, ["and", "synchronous"]) synchronous = "synchronous" in args succeeded = False lab = "" pyplot.figure() for val in splitted.values(): lab = lab + val + " and " if plot_single(val, glob_vars=glob_vars, printer=printer): succeeded = True if succeeded: lab = lab[:-5] pyplot.ylabel(lab) pyplot.grid(True) pyplot.show(block=synchronous) return True return False
def mmult(*args, glob_vars={}, printer=ConsolePrinter()): args = seperate_by_keywords(args, ["with"]) first=save_eval(args[None], glob_vars=glob_vars, printer=printer) sec=save_eval(args["with"], glob_vars=glob_vars, printer=printer) return array(matrix(first)*matrix(sec))