Moved plotting function inside RealTimeGraph

@sdhpzhtk  Changes we discussed on Saturday. Review and merge?