R language Access Menu

Adding title and axis-labels to ggplots

labs() function can be used to add title, subtitle and axis-labels to a ggplot: 

code: 

     > ggplot(bwdf, aes(age))+ geom_histogram()+ labs(title='Histogram of Age', x='Age (years)', y='Number of patients')

output: 

                    


    Comments & Feedback