Skip to content

Commit

Permalink
ttools: fix axis labelling bug
Browse files Browse the repository at this point in the history
Linear axis values were getting labelled as (e.g.) 5030 instead of 0.5030.
Fixed.
  • Loading branch information
mbtaylor committed Nov 13, 2013
1 parent 9305ef3 commit 1674c3e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ttools/src/main/uk/ac/starlink/ttools/plot2/BasicTicker.java
Expand Up @@ -324,15 +324,12 @@ else if ( exp < -sciLimit ) {
StringBuffer sbuf = new StringBuffer();
sbuf.append( sign );
int pexp = exp + ndigit;
if ( pexp == 0 ) {
sbuf.append( digits );
}
else if ( pexp > 0 ) {
if ( pexp > 0 ) {
sbuf.append( digits.substring( 0, pexp ) )
.append( "." )
.append( digits.substring( pexp ) );
}
else if ( pexp < 0 && pexp >= -sciLimit ) {
else if ( pexp <= 0 && pexp >= -sciLimit ) {
sbuf.append( "0." )
.append( zeros( -pexp ) )
.append( digits );
Expand Down

0 comments on commit 1674c3e

Please sign in to comment.