refactor relationship between plot and markers