cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Byron_JMP
Staff
Graphs with Light Text and Dark Backgrounds

 

In Pharma and Biotech, there was a time when "foils" and 35mm slides were the standard for presentations. Most of the time these slides had dark backgrounds and light colored text and figures. IMHO this format looked great. Well, times have changed and now the most common format is exactly the opposite and this is reflected in the default settings. The old-school look can be yours again, and a little JSL makes it easy.

 

purple graph.png

 

 

The script here formats a Bivariate plot and a Graph Builder plot. Note that both platforms require different messages., and I have a sneaking suspicion that every platform will be a little different.  A key to formatting othre platforms will be to use the tree structure to find references to where text lives, then use a little trial and error to figure out what parts to send messages to.

 

This works in JMP 12 with default preferences. I think older versions might work a little differently, and hopefully a future version will have a white text/dark background option.

 

 

 


//run the whole script together, it makes two graph windows.
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :weight ), X( :height ) );
rbiv = Report( biv );
rbiv << Text Color( "white" ); // this colors the title and axes
rbiv << background color( "dark purple" );
rbiv[framebox( 1 )] << background color( "purple" );
rbiv[Text Edit Box( 1 )] << font color( "white" ); //y axis label
rbiv[Text Edit Box( 2 )] << font color( "white" ); // x axis label
obj = Graph Builder(
  Size( 567, 452 ),
  Show Control Panel( 0 ),
  Variables( X( :weight ), Y( :height ), Group Y( :sex ), Color( :age ) ),
  Elements( Points( X, Y, Legend( 5 ) ), Line Of Fit( X, Y, Legend( 7 ) ) )
);
robj = Report( obj );
robj << Text Color( "white" ); // this colors the title
robj << background color( "dark purple" );
robj[FrameBox( 1 )] << background color( "  purple" );// upper pane background
robj[FrameBox( 2 )] << background color( " purple" );// lower pane background
robj[graphbuildertitlebox( 1 )] << font color( [255, 255, 235] );//title text
robj[graphbuildertitlebox( 2 )] << font color( [255, 255, 235] );//axis text
robj[graphbuildertitlebox( 3 )] << font color( [255, 255, 235] );//axis text
obj << Title Fill Color( "light purple" );//y axis group labels
obj << Title Frame Color( "dark purple" );
obj << Level Fill Color( "light purple" );
obj << Level Frame Color( "dark purple" );
robj[framebox( 1 )] << background color( "purple" );

 

Last Modified: Dec 8, 2016 11:03 AM
Comments