#*****************************************************************************80 # ## geyser_bar creates a bar plot of geyser eruption data. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 04 August 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "geyser_bar\n" ) cat ( " ", version$version.string, "\n" ) cat ( " Read binned data of waiting times between eruptions" ) cat ( " of the Old Faithful geyser." ) cat ( " Create a corresponding bar plot." ) filename = "geyser_bar_data.txt" xy <- read.table ( filename, header = FALSE ) print ( data ) filename = "geyser_bar.png" png ( filename ) barplot ( xy[,2], col = 'red', xlab = "Minutes", ylab = "Frequency", main = "Time between eruptions of Old Faithful" ) grid ( ) cat ( ' Graphics saved as "', filename, '"\n' ) # # Terminate. # cat ( "\n" ) cat ( "geyser_bar:\n" ) cat ( " Normal end of execution.\n" ) quit ( )