Acquire lock while plotting