Ho uno script che crea un output del generatore di grafici con un set di dati che ha un numero variabile di elementi nella legenda e un numero variabile di frame. Sono in grado di ottenere la struttura ad albero del frame quindi formattarli ma incapace di formattare la legenda. Penso di essere vicino ma qualcosa non funziona nell'ultima riga.
Ecco uno script di esempio.
Names Default To Here( 1 );
dt = Open("$SAMPLE_DATA/Solubility.jmp");
dtstack = dt << Stack(
columns(:Name( "1-Octanol" ),:Ether,:Chloroform,:Benzene,:Carbon Tetrachloride, :Hexane ),
Source Label Column( "Gas" ),
Stacked Data Column( "Solubility" )
);
gbname = dtstack << Graph Builder( Size( 668, 643 ), Show Control Panel( 0 ),
Variables( Y( :Solubility ), Wrap( :Gas ), Overlay( :Labels ) ),
Elements( Points( Y, Legend( 12 ) ) )
);
frames = gbname << xpath("//FrameBox"); //gets frames, works
frames << set background color( -16512221 ); //formats frames, works
LegendPallet = gbname << xpath("//LegendBox"); //gets legend, i think this works
LegendPallet << Color Theme( "Pastel" ); //formats color theme --doesn't work. I suspect an issue with my obj.Provare
<< Categorical Color Theme( "Pastel" );
Vedi l'indice di scripting per un esempio
Aiuto ==> Ricerca indice script su pastello