cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
samir
Level IV

How to access/change box plot colors in script

Hello,

I am wrinting scripts to automatically collect data and make graphs...

My issue is that I get a graph with varying number of box plots (26 boxes in the example attached), I would like to change the box plot properties (Fillcolor, line color, transparency,...) but I do not know how to access the 26 box plots at a time or seperatly (but via a script)...

I checked manually and I see that there are several boxplot objects: I even modified manually the color of Box Plot (50), but when I look at the script and try to modifyu it, it does not work...

So my question: How to ask and get the references to all the boxplots ?

And how to change their properties (all of them) ?

Many thanks.

PS: for ease, I included a graph and the original table I used (the script is embedded in the data table). The script I get is also added.

 

ExampleBoxPlots.PNG

 

Graph Builder(
	Show Legend( 0 ),
	Y Group Title Orientation( "Horizontal" ),
	Y Group Level Orientation( "Horizontal" ),
	Variables( X( :QVoltages ), Y( :Value ) ),
	Elements(
		Points( X, Y, Legend( 1 ), Jitter( 1 ) ),
		Box Plot(
			X,
			Y,
			Legend( 3 ),
			Jitter( 1 ),
			Outliers( 1 ),
			Box Style( "Outlier" )
		)
	),
	SendToReport(
		Dispatch(
			{},
			"QVoltages",
			ScaleBox,
			{Show Major Grid( 1 ), Show Minor Grid( 1 ), Inside Ticks( 1 ),
			Rotated Labels( "Vertical" )}
		),
		Dispatch(
			{},
			"Ron_1p5V [Ohm]",
			ScaleBox,
			{Min( 40 ), Max( 100 ), Inc( 10 ), Minor Ticks( 1 ),
			Show Major Grid( 1 ), Show Minor Grid( 1 ), Inside Ticks( 1 )}
		),
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "Value" )} ),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{DispatchSeg(
				Box Plot Seg( "Box Plot (50)" ),
				{Box Style( "Outlier" ), Line Color( "Dark Red" ), Line Width( 2 ),
				Fill Color( "Red" ), Transparency( 0.5 )}
			)}
		)
	)
)
10 REPLIES 10
samir
Level IV

Re: How to access/change box plot colors in script

Thanks a lot guys !

I am now ready for fency things :)