Remove old element before appending new graph