added VISUAL_LOG_MIN/MAX to mark extrema