public WorkSheet getLogScale ( double base , double zeroValue ) throws Exception { WorkSheet workSheet = new WorkSheet ( getRows ( ) , getColumns ( ) ) ; workSheet . setIndexColumnName ( this . getIndexColumnName ( ) ) ; ArrayList < String > rows = getRows ( ) ; ArrayList < String > columns = getColumns ( ) ; for ( String row : rows ) { for ( String col : columns ) { if ( this . isMetaDataColumn ( col ) || this . isMetaDataRow ( row ) ) { String value = getCell ( row , col ) ; workSheet . addCell ( row , col , value ) ; } else { String value = getCell ( row , col ) ; try { Double d = Double . parseDouble ( value ) ; if ( d == 0.0 ) { d = zeroValue ; } else { d = Math . log ( d ) / Math . log ( base ) ; } workSheet . addCell ( row , col , d + "" ) ; } catch ( Exception e ) { workSheet . addCell ( row , col , value ) ; } } } } ArrayList < String > metadataRows = this . getMetaDataRows ( ) ; ArrayList < String > metadataColumns = this . getMetaDataColumns ( ) ; workSheet . setMetaDataColumns ( metadataColumns ) ; workSheet . setMetaDataRows ( metadataRows ) ; return workSheet ; }
Get the log scale of this worksheet