refactoring variables in plot method

Change-Id: I2a4acefb12fcf58410c6e9783cfeaf41dd02dc04
Reviewed-on: http://review.couchbase.org/24941
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>