add maxlen argument to plotgen

Useful for monitors where you don't want to retain things forever