working graph code need to fix ggplot part and fixed path for determine gapsize