File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 36483648 }
36493649
36503650 if ( ( textscale > 0 ) && ( textscale < 1. ) ) {
3651- labelfont . size = Math . floor ( labelfont . size * textscale ) ;
3651+ // rotate X lables if they are too big
3652+ if ( ( textscale < 0.7 ) && ! vertical ) {
3653+ label_g . selectAll ( "text" ) . each ( function ( ) {
3654+ var txt = d3 . select ( this ) , x = txt . attr ( "x" ) , y = txt . attr ( "y" ) ;
3655+
3656+ txt . attr ( "transform" , "translate(" + x + "," + y + ") rotate(20)" )
3657+ . attr ( "x" , null ) . attr ( "y" , null ) ;
3658+ } ) ;
3659+ textscale *= 2 ;
3660+ }
3661+ // round to upper boundary for calculated value like 4.4
3662+ labelfont . size = Math . floor ( labelfont . size * textscale + 0.7 ) ;
36523663 label_g . call ( labelfont . func ) ;
36533664 }
36543665
3655- // axis.fTitle = "M_{#mu#mu}";
3656-
36573666 if ( axis . fTitle . length > 0 ) {
36583667 var title_g = axis_g . append ( "svg:g" ) . attr ( "class" , "axis_title" ) ,
36593668 title_fontsize = Math . round ( axis . fTitleSize * text_scaling_size ) ,
You can’t perform that action at this time.
0 commit comments