Improved visualization with R script